-
-
Notifications
You must be signed in to change notification settings - Fork 41
fix: comprehensive invoice validation and UI enhancements #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kumawatkaran523
merged 7 commits into
StabilityNexus:main
from
Atharva0506:fix/invoice-validation
Jul 2, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5321d09
fix: comprehensive invoice validation and UI enhancements
Atharva0506 077252e
fix: change toggle arrow color and resolve lint issues
Atharva0506 c53d4fa
style: make toggle arrow darker and more distinct
Atharva0506 d8d42b3
fix: resolve batch form state issues and input clear-on-change UX
Atharva0506 9ed6593
fix: clear item errors on change in single invoice page
Atharva0506 997b8d9
fix(invoice): resolve PR review suggestions for validation and UX
Atharva0506 5406cd0
fix(invoice): resolve remaining PR review suggestions
Atharva0506 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import React from 'react'; | ||
| import { ArrowRightLeft } from 'lucide-react'; | ||
|
|
||
| export const AmountTypeToggle = ({ value, onChange, className = "" }) => { | ||
| return ( | ||
| <div className={`inline-flex items-center gap-1 p-1 bg-gray-100 rounded-lg border border-gray-200 ${className}`}> | ||
| <button | ||
| type="button" | ||
| onClick={() => onChange("amount")} | ||
| aria-pressed={value === "amount"} | ||
| className={`px-2.5 py-1 text-xs font-medium rounded-md transition-all duration-200 ${ | ||
| value === "amount" | ||
| ? "bg-white text-gray-900 shadow-sm border border-gray-200" | ||
| : "text-gray-500 hover:text-gray-700" | ||
| }`} | ||
| > | ||
| Flat | ||
| </button> | ||
|
|
||
| <button | ||
| type="button" | ||
| onClick={() => onChange(value === "amount" ? "percentage" : "amount")} | ||
| aria-label={`Toggle type, currently ${value}`} | ||
| className="p-1 text-slate-800 bg-gray-200 hover:bg-gray-300 hover:text-black transition-colors rounded-full flex-shrink-0" | ||
| title="Toggle type" | ||
| > | ||
| <ArrowRightLeft className="w-4 h-4" /> | ||
| </button> | ||
|
|
||
| <button | ||
| type="button" | ||
| onClick={() => onChange("percentage")} | ||
| aria-pressed={value === "percentage"} | ||
| className={`px-2.5 py-1 text-xs font-medium rounded-md transition-all duration-200 ${ | ||
| value === "percentage" | ||
| ? "bg-white text-gray-900 shadow-sm border border-gray-200" | ||
| : "text-gray-500 hover:text-gray-700" | ||
| }`} | ||
| > | ||
| % | ||
| </button> | ||
| </div> | ||
| ); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.