feat(DEV-16185): add purchase order management components and functionality#829
Open
costa-monite wants to merge 5 commits intomainfrom
Open
feat(DEV-16185): add purchase order management components and functionality#829costa-monite wants to merge 5 commits intomainfrom
costa-monite wants to merge 5 commits intomainfrom
Conversation
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.
Purchase Orders Management
Complete Purchase Order Lifecycle
Purchase Order Form Features
valid_for_days(API field)Tab-based Navigation
🏗️ Shared Component Architecture
ItemsSection Component
ItemsSectionConfigConfigurableDataTable
FormErrorDisplay
ui/FormErrorDisplayfor cross-feature reuse🎨 UI Components
tab-bar.tsx
🛠️ Technical Improvements
Currency & Price Handling
actualCurrency → product.price.currency → item.currencyuseEffectfor async-loaded settingsDate Handling (Purchase Orders)
setUTCHours(0, 0, 0, 0)differenceInCalendarDaysinstead ofdifferenceInDayscreated_at/issued_at+valid_for_daysuseMemodependencies in Overview componentValidation with Zod
counterpart_id), line items, entity, currencyEmail Functionality
Email Composition Modal
API & Schema Updates
OpenAPI Schema
/payable_purchase_orders/payable_purchase_orders/{id}/send🧪 Testing
E2E Test Coverage
purchase-orders.spec.tspurchase-orders.validation.spec.tsUnit Tests
PurchaseOrders.test.tsxPurchaseOrderForm.test.tsxpurchase-order-currency.test.tsx- Currency conversion and display logiccalculations-normalization.test.ts- Date calculations with UTC normalization and DST handlingJest Configuration
jest-css-transform.jsto handle@importstatements in CSS files🔄 Refactoring
Code Organization
ItemsSection/- Reusable line items componentui/FormErrorDisplay/- Error display componentutils/vatUtils.ts- VAT calculation utilitiesutils/calculations.ts- Purchase order calculations with DST handlingutils/currencies.ts- Currency formatting and conversion🧪 Manual QA Checklist
Summary by CodeRabbit
New Features
Tests
Chores