Skip to content

Blue complete button 180#214

Open
calebkeener13 wants to merge 6 commits intomainfrom
blue-complete-button-180
Open

Blue complete button 180#214
calebkeener13 wants to merge 6 commits intomainfrom
blue-complete-button-180

Conversation

@calebkeener13
Copy link
Contributor

fix: Complete Shift button turns blue when all required fields are filled

  • Add isFormComplete() validation function to check all required fields
  • Update button styling to show blue (#0F7AFF) when form is complete
  • Disable button when form is incomplete or submitting
  • Button updates in real-time as fields are completed

@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for bagel-rescue ready!

Name Link
🔨 Latest commit 70a0eac
🔍 Latest deploy log https://app.netlify.com/projects/bagel-rescue/deploys/691bc715ab6c480008c235ee
😎 Deploy Preview https://deploy-preview-214--bagel-rescue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 18, 2025

Disclaimer: This comment was AI-generated and is not necessarily completely accurate. Please take code comments with a grain of salt.

Greptile Summary

  • Implemented form validation with isFormComplete() function that enables blue button (#0F7AFF) when all required fields are filled (start/end time, routes, volunteers, selected days, and date range if enabled)
  • Fixed date parsing logic to use local time instead of UTC to prevent timezone-related date shifting issues
  • Removed volunteer self-signup functionality by deleting /signup page, removing signup link from login page, updating middleware, and modifying invitation emails to instruct users to contact administrators

Confidence Score: 4/5

  • This PR is safe to merge with only minor style improvements needed
  • The implementation correctly adds form validation, fixes a timezone bug, and cleanly removes signup functionality. One style improvement suggested (using CSS variable instead of hardcoded color). The bagels.png file appears unrelated to the PR changes but doesn't break anything.
  • The bagels.png file in src/app/Login/ appears unrelated to this PR and may have been added accidentally

Important Files Changed

Filename Overview
src/app/AdminNavView/NewShiftPage/page.tsx Added isFormComplete() validation function and updated button styling to show blue when complete, plus fixed date parsing to avoid timezone issues
src/app/Login/bagels.png Binary image file added but not referenced in Login page changes

Sequence Diagram

sequenceDiagram
    participant User
    participant NewShiftPage
    participant isFormComplete
    participant saveEdits
    participant Database

    User->>NewShiftPage: "Fill in start time"
    NewShiftPage->>isFormComplete: "Check form completion"
    isFormComplete-->>NewShiftPage: "false (incomplete)"
    NewShiftPage->>NewShiftPage: "Button stays gray, disabled"
    
    User->>NewShiftPage: "Fill in end time"
    User->>NewShiftPage: "Add route"
    User->>NewShiftPage: "Add volunteer"
    User->>NewShiftPage: "Select days"
    
    NewShiftPage->>isFormComplete: "Check form completion"
    isFormComplete-->>NewShiftPage: "true (complete)"
    NewShiftPage->>NewShiftPage: "Button turns blue, enabled"
    
    User->>NewShiftPage: "Click Complete Shift button"
    NewShiftPage->>saveEdits: "Submit form"
    saveEdits->>saveEdits: "Parse dates with timezone fix"
    saveEdits->>Database: "Create shift"
    Database-->>saveEdits: "Success"
    saveEdits-->>User: "Navigate to shifts page"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Comment on lines +532 to +534
: isFormComplete()
? '#0F7AFF'
: '#A3A3A3',
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Use var(--Bagel-Rescue-Blue) instead of hardcoded #0F7AFF to match the color definition in src/app/globals.css

Context Used: Rule from dashboard - Use colors from the tailwind config for toolbar buttons and text instead of custom colors. The tailw... (source)

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.

1 participant