feat: implement print button state management across invoice components#325
Open
MohamedAliSmk wants to merge 4 commits into
Open
feat: implement print button state management across invoice components#325MohamedAliSmk wants to merge 4 commits into
MohamedAliSmk wants to merge 4 commits into
Conversation
590bb5b to
fc80d4f
Compare
…ted views - Added PrintInvoiceButton component to InvoiceDetailDialog, InvoiceManagement, InvoiceHistoryDialog, and OfflineInvoicesDialog for consistent printing functionality. - Updated component imports and computed properties to manage print permissions and button states. - Enhanced type definitions in components.d.ts to include PrintInvoiceButton. Co-authored-by: Cursor <cursoragent@cursor.com>
fc80d4f to
0a5654c
Compare
added 3 commits
June 23, 2026 16:42
- Updated PrintInvoiceButton to accept an invoice object directly, removing the need for separate props for disabled state, button class, and title. - Enhanced reprint permission logic by introducing isInvoicePrinted utility function to determine if an invoice has been printed. - Refactored related components (InvoiceDetailDialog, InvoiceManagement, InvoiceHistoryDialog, OfflineInvoicesDialog) to utilize the new props structure for PrintInvoiceButton, improving code consistency and readability.
…ting logic - Deleted the PrintInvoiceButton component to streamline the printing process. - Updated InvoiceDetailDialog, InvoiceManagement, InvoiceHistoryDialog, and OfflineInvoicesDialog to use inline button implementations for printing invoices. - Integrated reprint permission logic directly into the button components, enhancing user experience and maintaining consistent functionality across invoice-related views. - Adjusted type definitions in components.d.ts to reflect the removal of PrintInvoiceButton.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enhanced the invoice printing functionality by introducing a computed property to manage the print button state based on user permissions and invoice data. Updated multiple components (InvoiceDetailDialog, InvoiceManagement, InvoiceHistoryDialog, OfflineInvoicesDialog) to utilize this new state management, ensuring buttons are enabled or disabled appropriately. Added translations for reprint permissions and updated the backend to support role-based reprint access.