Skip to content

Dev - #36

Merged
dishantttt merged 5 commits into
mainfrom
dev
Jan 20, 2026
Merged

Dev#36
dishantttt merged 5 commits into
mainfrom
dev

Conversation

@dishantttt

@dishantttt dishantttt commented Jan 20, 2026 •

Copy link
Copy Markdown
Collaborator

CodeAnt-AI Description

Make exported timestamps human-readable and simplify the "Add Entry" form

What Changed

  • Exported CSV/XLSX timestamps (CreatedAt, UpdatedAt, CheckInTime, CheckOutTime) are now shown in human-readable IST (DD-M-YYYY h:mm:ss AM/PM) instead of ISO strings
  • The Add Entry workflow no longer includes Check-In time or gate inputs; new entries are created as Open and can be closed later
  • Destination selection in the entry modal is replaced with button-style radio choices; modal now validates that a destination button is selected and focuses the first option when opened
  • Exit gate selection remains required, and the modal hides before submitting the simplified hidden form to avoid overlay issues

Impact

✅ Readable timestamps in exports
✅ Shorter entry creation with fewer required fields
✅ Clearer destination selection for faster form completion

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Jan 20, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@dishantttt
dishantttt merged commit 0c5c9c2 into main Jan 20, 2026
1 check passed
@codeant-ai

codeant-ai Bot commented Jan 20, 2026

Copy link
Copy Markdown

Sequence Diagram

Shows the main user flow for creating a khokha entry (now always created as Open since check-in fields removed) and the export flow where timestamps are formatted into a readable IST string for Excel/CSV exports.

sequenceDiagram
    participant User
    participant Browser
    participant Backend
    participant Exporter
    participant Database

    User->>Browser: Enter roll & trigger lookup
    Browser->>Backend: GET /lookup (fetch student details)
    Backend-->>Browser: Student info
    Browser->>Browser: Show modal (destination radios, checkout time/gate)
    User->>Browser: Submit modal -> hidden form POST /entries
    Browser->>Backend: POST /entries (no check-in fields => created Open)
    Backend->>Database: Save new entry (isClosed = false)
    Backend-->>Browser: 201 Created / redirect
    Browser->>Exporter: Request export (xlsx/csv)
    Exporter->>Database: Query entries
    Exporter-->>Exporter: Convert timestamps to readable IST format
    Exporter-->>Browser: Respond file (exports with human-readable IST timestamps)
Loading

Generated by CodeAnt AI

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Jan 20, 2026
@codeant-ai

codeant-ai Bot commented Jan 20, 2026

Copy link
Copy Markdown

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Removed fields
    The hidden check-in inputs (f_checkInTime, f_checkInGate) were removed from the hidden form. If the server-side endpoint expects these fields (even as empty strings) their absence may change behavior or cause errors. Confirm server handling and compatibility with the new form payload.

  • Destination selection UX/validation
    Destination was changed from a select to a button-style radio group. Ensure the group state, form submission and server parsing all expect the same values. Also verify that required is applied appropriately to enforce selection for all browsers and assistive tech.

  • Focus on non-focusable element
    The code calls .focus() on a label element (label[for="dest_city"]). Labels are not reliably focusable across browsers and assistive tech; this may not provide the intended keyboard UX. Consider focusing the radio input instead or making the label focusable/accessibly interactive.

@codeant-ai

codeant-ai Bot commented Jan 20, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants