Commit Graph

16 Commits

Author SHA1 Message Date
vergiLgood1 5bd92a0399 feat: Enhance Selfie Verification Step with Dark Mode Support and Improved Snackbars
- 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.
2025-05-26 13:31:12 +07:00
vergiLgood1 c7bdb24ceb feat: Add triggers and functions for user management and location handling
- 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.
2025-05-18 13:52:26 +07:00
vergiLgood1 4b0bae1bcd feat: Implement migration and seeding for officers and patrol units
- 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.
2025-05-16 00:50:30 +07:00
vergiLgood1 db8e2a6321 add seeds supaabse 2025-05-14 06:54:34 +07:00
vergiLgood1 77c865958a feat: Add crime data JSON and district center data for crime incidents
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
2025-05-12 08:17:26 +07:00
vergiLgood1 e422c59da9 Add crime data CSV files and update database schema
- 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.
2025-05-11 14:44:14 +07:00
vergiLgood1 969d10958c refactor: streamline SQL migration scripts and enhance schema management for units and incidents 2025-05-06 15:37:07 +07:00
vergiLgood1 e891df87d0 Refactor seeding scripts to utilize generateIdWithDbCounter for unique ID generation across crime categories, incidents, and units. Implement a new utility function for generating distributed points within district areas to enhance incident location variability. Comment out unnecessary type drops and creations in SQL migration files for clarity. Add migration scripts to drop and re-add the phone field in the units table, ensuring data integrity during schema updates. 2025-05-06 01:21:04 +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 ca90871b22 remove older project 2025-02-28 19:26:26 +07:00
vergiLgood1 10ce404a1d add trigger for auth.users to custom public.user 2025-02-27 19:58:21 +07:00
vergiLgood1 538a8f4fa8 add shema for map fitur 2025-02-21 06:03:47 +07:00
vergiLgood1 bc0c6438a2 fecth dynamic navitem 2025-02-20 23:50:45 +07:00
vergiLgood1 55f295cee3 feat(contact us): Send email function
Send email to admin and get the confirmation message from admin
2025-02-19 02:08:45 +07:00
vergiLgood1 c7e0e2905c init prisma and edge functions 2025-02-17 23:41:35 +07:00