Skip to content

Enhance Police Dashboard and Vehicle Management Features - #67

Merged
vthish merged 27 commits into
mainfrom
development
Jun 21, 2026
Merged

vthish merged 27 commits into
mainfrom
development

Conversation

@vthish

@vthish vthish commented Jun 21, 2026

Copy link
Copy Markdown
Owner

This pull request introduces major changes to the backend data model, authentication DTOs, and project dependencies. The Prisma schema and migration have been significantly refactored to support a more normalized and flexible database structure, especially for user roles and license management. Additionally, DTOs for password reset flows have been updated and clarified, and new dependencies for email handling have been added.

The most important changes are:

Database Schema and Migration (Prisma):

  • Major refactor of the Prisma schema and corresponding migration, including:
    • Dropping and recreating several tables (District, License, OffenseCategory, Officer) and enums, and introducing new tables such as Driving_License, Division, DMT_Admin, Police_Admin, Divisional_Head, Traffic_Officer, Offence_Category, Fine_Offence, Payment, and others.
    • Changing primary keys and column names for Fine, Shift, and User tables, adding new required fields, and updating foreign key relationships.
    • Adding new enums for statuses and roles, and updating relationships to support multiple heads per division and more granular user roles. [1] [2] [3]

Authentication DTOs:

  • Refactored and clarified DTOs for password reset flows:
    • Split DTOs into request and reset types for both Head and Officer roles, with explicit fields for username, badge number, email, OTP, and new password. [1] [2] [3]

Dependencies:

  • Added nodemailer and @types/nodemailer to support email notifications, likely for password reset flows. [1] [2] [3] [4] [5] [6]

Project Setup:

  • Updated .gitignore to include Node.js, Next.js, environment files, debug logs, and OS-specific files for better repository hygiene.

These changes lay the groundwork for advanced user management, secure authentication flows, and improved maintainability of the backend.

ThilokaIndhuwari and others added 27 commits June 13, 2026 12:15
- Updated PoliceLayout to include a new sidebar button for managing offenses.
- Replaced <img> with Next.js <Image /> for better performance.
- Introduced ManageOffenses component for CRUD operations on traffic offenses.
- Implemented state management for offense data, including search and pagination.
- Enhanced PoliceOverview to fetch and display statistics and recent activities.
Enhance Police Dashboard and Update Vehicle Management Features
@vthish
vthish merged commit d20b397 into main Jun 21, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

vthish added a commit that referenced this pull request Jun 27, 2026
Enhance Police Dashboard and Vehicle Management Features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants