Skip to content

Standardize Settings page layout and design - #8

Open
HugoLeBoennec wants to merge 6 commits into
mainfrom
claude/standardize-settings-page-01WpdvBdFbRyqJWHZhYDL7Mf
Open

Standardize Settings page layout and design#8
HugoLeBoennec wants to merge 6 commits into
mainfrom
claude/standardize-settings-page-01WpdvBdFbRyqJWHZhYDL7Mf

Conversation

@HugoLeBoennec

Copy link
Copy Markdown
Owner
  • Add proper page header with title and description
  • Organize content into distinct sections with white cards
  • Improve navigation links with better styling and descriptions
  • Add proper spacing and padding (p-6) to match other pages
  • Enhance form layout with space-y-4 for consistent spacing
  • Style submit button to match application standard (blue-600)
  • Use rounded-lg shadows and modern Tailwind classes throughout
  • Separate "Configuration avancée" and "Paramètres rapides" sections

- Add proper page header with title and description
- Organize content into distinct sections with white cards
- Improve navigation links with better styling and descriptions
- Add proper spacing and padding (p-6) to match other pages
- Enhance form layout with space-y-4 for consistent spacing
- Style submit button to match application standard (blue-600)
- Use rounded-lg shadows and modern Tailwind classes throughout
- Separate "Configuration avancée" and "Paramètres rapides" sections
The Billing page was essentially empty (only had a save button with no functionality),
while Invoices page contains all actual invoice management features (listing, filtering,
creating, editing, deleting invoices, stats, etc.).

Changes:
- Deleted src/renderer/Billing.tsx (empty component)
- Removed Billing import from App.tsx
- Removed 'Billing' from navigation links array
- Removed /billing route definition

All invoice-related functionality is now centralized in the Invoices page.
Implements quote tracking, flexible signature support, and financial
metrics for the dashboard as requested for 2026 French compliance readiness.

## Database Schema Changes
- Add quotes table with full CRUD support (simple tracking)
- Add quote_lines table for quote line items
- Add signature fields to invoices (flexible hybrid approach):
  - signature_type: 'none' | 'manual' | 'drawn' | 'digital_certificate'
  - signature_data, is_signed, signed_at, signed_by, signature_file_path
- Add payment_terms_days field to invoices (default 30 days)
- Create indexes and triggers for new tables
- Add migration file: 002_add_quotes_and_signatures.sql

## Backend Changes
- Create QuoteRepository with complete CRUD operations
- Add dashboard financial metrics methods to InvoiceRepository:
  - countSent(): Count sent invoices
  - countSigned(): Count signed invoices
  - getFinancialMetrics(): Calculate awaiting/overdue amounts
- Update DatabaseService to include quotes repository
- Enhance DatabaseStats with sent_invoices, signed_invoices, total_quotes
- Add Quote and QuoteLine types with filters

## IPC & API Changes
- Add complete quote API handlers (create, read, update, delete, lines)
- Add invoice:getFinancialMetrics handler
- Expose quote API in preload.ts with full TypeScript support
- Add getFinancialMetrics to invoice API

## Frontend Dashboard Enhancement
- Add financial metrics cards:
  - Amount awaiting payment (with configurable payment terms)
  - Overdue amount (past payment terms)
- Replace old metric cards with new business metrics:
  - Number of quotes
  - Number of sent invoices
  - Number of signed invoices
  - Number of customers
- Add formatAmount helper for proper currency display
- Fetch and display financial metrics from backend

## Signature Implementation Strategy
- Flexible database structure allows for future signature upgrades
- Current implementation supports manual marking (compliance not required)
- Structure ready for signature pad or PDF digital certificates later
- NOT required for 2026 French Factur-X compliance (confirmed via docs)

## Notes
- Quotes system: Simple tracking only (no conversion to invoice yet)
- Payment terms: Global 30-day default, per-invoice configurable
- Signatures: Manual flag ready, upgradeable to drawn/certificate
- All changes maintain backward compatibility
- No breaking changes to existing invoice functionality
Add InvoiceForm component and route to resolve "No routes matched
location '/invoices/new'" error that was breaking the app.

Changes:
- Create InvoiceForm.tsx placeholder component with basic structure
- Add /invoices/new route to App.tsx
- Form shows invoice creation UI (implementation pending)
- Includes cancel and submit buttons with navigation
- Matches design system with Tailwind classes

The form is a placeholder for now - full invoice creation logic
will be implemented in a future update. This unblocks the app
from crashing when users click "Nouvelle facture" buttons.
- Convert date and payment terms inputs to controlled components
- Enable auto-calculation of due date based on invoice date and payment terms
- Allow manual override of due date when needed
- Ensure form state properly reflects user input
- Fixed "Missing named parameter 'buyer_reference'" error
- Added buyer_reference and purchase_order_ref fields to invoice creation
- Set both fields to undefined as they are optional
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