Skip to content
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

(feat) Credit note export & filtering #1930

Merged
merged 28 commits into from
Dec 23, 2024
Merged

Conversation

stephenlago99
Copy link
Collaborator

@stephenlago99 stephenlago99 commented Dec 23, 2024

Context

Dive-in is available at: [FE] [Dive-in] Credit note export.

This pull request handles filtering and exporting for credit notes.

Description

Exporting

To make it easier for future us to create export dialogs for different entities, the ExportInvoiceDialog was made general and transformed into ExportDialog. This will enable us to quickly re-use it for future entities. Because of the current structure of the InvoicesPage, which embeds both Invoices and Credit notes, it might look weird that we have it defined 2 times, but in the future, when the credit notes tab will be extracted, this won't be the case.

Filtering

To aid the inclusion of the existing Filters in the credit note page, some changes have been made to the bits and pieces that handled filters:

  • Updated how we parse the values
  • Updated from long switch cases to object-based logic

Future possible improvements:

  • Remove the encoded "filters for invoices" logic and let handle it in a general way
  • Remove the parsing we do on a case-by-case basis and replace it with general logic (for example, directly split strings that include ",")
  • Separate the Credit Notes logic from the InvoicesPage component
  • Replace the styled components from the Filters with tailwind classes (this will not be done as part of this PR, to keep the scope focused on the business logic)

Fixes LAGO-624
Fixes LAGO-625

@stephenlago99 stephenlago99 self-assigned this Dec 23, 2024
@stephenlago99 stephenlago99 changed the title Draft: (feat) Credit note export (feat) Credit note export & filtering Dec 23, 2024
@stephenlago99 stephenlago99 force-pushed the feat-credit-note-export branch from aae914a to db29d05 Compare December 23, 2024 12:05
@stephenlago99 stephenlago99 requested review from ansmonjol and removed request for ansmonjol December 23, 2024 12:06
@stephenlago99 stephenlago99 enabled auto-merge (squash) December 23, 2024 16:35
@stephenlago99 stephenlago99 merged commit c23ce72 into main Dec 23, 2024
4 checks passed
@stephenlago99 stephenlago99 deleted the feat-credit-note-export branch December 23, 2024 16:43
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.

2 participants