Skip to content

[US-8.4] Quote Management#66

Merged
dacanetdev merged 1 commit intomainfrom
feature/US-8.4-quote-management
Mar 31, 2026
Merged

[US-8.4] Quote Management#66
dacanetdev merged 1 commit intomainfrom
feature/US-8.4-quote-management

Conversation

@dacanetdev
Copy link
Copy Markdown
Owner

Summary

  • US-8.4 — Quote Management (3 SP) — Sprint 8 final user story
  • Sellers can save POS cart as a quote (no inventory deduction, 30-day validity)
  • Quote list at /cotizaciones with expiry indicator, convert-to-sale, and cancel actions
  • Converting a quote pre-loads the POS cart with quote items for normal payment flow

Changes

Backend (Application + Domain + Infrastructure)

  • Sale.ExpiresAt nullable field + AddSaleExpiresAt EF migration
  • CreateSaleCommandHandler: auto-sets ExpiresAt = UtcNow+30d when Type == Quote
  • ConvertQuoteToSaleCommand + handler: validates quote open/not-expired, marks Cancelled
  • GetSalesQuery: new SaleType? Type filter parameter
  • ISaleRepository.GetPagedAsync: added SaleType? type parameter
  • SaleEndpoints: saleType query param + POST /{id}/convert endpoint

Frontend (Blazor)

  • PaymentPanel.razor: "Guardar como Cotización" button with OnQuoteSaved callback
  • Pos.razor: accepts ?quoteId= param → pre-loads cart items from quote on init
  • QuoteList.razor at /cotizaciones: paginated table with expiry chip, convert & cancel
  • NavMenu.razor: "Cotizaciones" link under VENTAS section
  • 15 es-MX localization keys added
  • ISaleService/SaleService: type param + ConvertQuoteToSaleAsync

Test plan

  • All 207 unit tests pass ✅
  • Build clean (0 warnings, 0 errors) ✅
  • POS → add items → "Guardar como Cotización" → Snackbar with folio
  • Navigate to /cotizaciones → quote appears with expiry date chip
  • "Convertir a Venta" → POS opens with cart pre-loaded → complete payment
  • "Cancelar" → quote disappears from list (shows in cancelled filter)
  • Expired quotes (>30 days) show red chip and "Convertir a Venta" is disabled

🤖 Generated with Claude Code

- Add ExpiresAt (nullable) to Sale entity + migration AddSaleExpiresAt
- CreateSaleCommandHandler auto-sets ExpiresAt=UtcNow+30d for Quote type
- ConvertQuoteToSaleCommand: validates quote open/not-expired, marks Cancelled
- SaleType? filter added to GetSalesQuery/ISaleRepository/SaleRepository
- POST /api/v1/sales/{id}/convert endpoint in SaleEndpoints
- PaymentPanel: "Guardar como Cotización" button (OnQuoteSaved callback)
- Pos.razor: accepts ?quoteId= param, pre-loads cart from quote items on init
- QuoteList.razor at /cotizaciones with expiry chip, convert & cancel actions
- NavMenu: "Cotizaciones" link under VENTAS section
- ISaleService/SaleService: type param + ConvertQuoteToSaleAsync
- 15 es-MX localization keys for quote management UI
- Updated GetSalesQueryHandlerTests to match new ISaleRepository signature

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dacanetdev dacanetdev merged commit 60b3693 into main Mar 31, 2026
8 of 14 checks passed
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