Skip to content

feat: Audio Component Invoice Management (#438)#576

Open
Timrossid wants to merge 1 commit into
rinafcode:mainfrom
Timrossid:bugfix/audio-component-invoice-management-438
Open

feat: Audio Component Invoice Management (#438)#576
Timrossid wants to merge 1 commit into
rinafcode:mainfrom
Timrossid:bugfix/audio-component-invoice-management-438

Conversation

@Timrossid
Copy link
Copy Markdown
Contributor

@Timrossid Timrossid commented May 29, 2026

Closes #438


Audio Component Invoice Management

Implements invoice management for audio/video content to address bug #438.

Changes

New Files:

  • src/types/invoice.ts - Invoice, InvoiceStatus, InvoiceContentType, InvoiceSummary, InvoiceFilter type definitions
  • src/hooks/useAudioInvoice.ts - Hook with mock data, filtering, search, CRUD operations
  • src/components/audio/AudioInvoiceBadge.tsx - Status badge (paid/pending/failed/refunded/cancelled)
  • src/components/audio/AudioInvoiceList.tsx - Filterable invoice list with search, status/type dropdowns, summary
  • src/components/audio/AudioInvoiceDetail.tsx - Full invoice detail card
  • src/components/audio/AudioInvoiceManager.tsx - Modal orchestrator with list/detail views and invoice button
  • src/components/audio/index.ts - Barrel exports
  • src/components/audio/tests/AudioInvoice.test.tsx - 30 unit tests

Modified Files:

  • src/types/index.ts - Added invoice type exports
  • src/app/components/video/VideoPlayer.tsx - Added lessonId prop and invoice button integration
  • src/app/components/video/AdvancedVideoPlayer.tsx - Added invoice button integration

Tests

All 30 new tests pass. Existing DashboardFilters tests (11) continue to pass with no regressions.

- Add Invoice types (InvoiceStatus, InvoiceContentType, InvoiceSummary, InvoiceFilter)
- Create useAudioInvoice hook with mock data, filtering, and state management
- Add AudioInvoiceBadge component for status display
- Add AudioInvoiceList with search, status/type filters, and summary
- Add AudioInvoiceDetail with full invoice view and back navigation
- Add AudioInvoiceManager modal orchestrating list/detail views
- Integrate AudioInvoiceButton into VideoPlayer and AdvancedVideoPlayer
- Export all components from src/components/audio/index.ts
- Add 30 unit tests covering all components and hook
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Timrossid Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix workflow.

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.

bug Audio Component : Invoice Management

2 participants