Commit Graph

255 Commits

Author SHA1 Message Date
Matt bed42c7329 Fix visual bugs in expenses page and interest details modal
- Fixed calendar button positioning in date input fields by adding proper padding
- Reduced Current Month button size from large to default for better fit
- Improved export button spacing using ga-4 instead of gap-6
- Removed Save & Close button from InterestDetailsModal, keeping only Save Changes button
- Updated mobile layout to use full width for Save Changes button
2025-07-12 14:46:08 -04:00
Matt 0762306bf3 Fix duplicate detection system - improve blocking strategy for interests
- Updated interest blocking strategy to group by name prefix instead of email domain
- This fixes the issue where interests with different email domains were never compared
- Updated admin duplicate finder to use the new centralized utility
- Both Matthew Ciaccio entries will now be detected as duplicates
2025-07-12 14:04:01 -04:00
Matt 080cb60d71 feat: Implement centralized duplicate detection utility for expenses and interests 2025-07-12 13:42:53 -04:00
Matt b8a6a52417 fix: Update authentication callback to return HTML with client-side redirect for SPA compatibility 2025-07-12 13:25:45 -04:00
Matt 9f7aa99320 fix: Refine sidebar design and navigation
- Make 'Port Nimara CRM' single line with larger logo (40px)
- Center logo perfectly in rail/collapsed mode
- Remove Dashboard button from navigation
- Make Interest List the first navigation item
- Remove duplicate navigation entries
- Improve visual alignment and spacing
2025-07-11 17:30:44 -04:00
Matt 1a24faa9db fix: Improve sidebar UX and mobile/PWA compatibility
- Remove Interest Emails from navigation (hidden as requested)
- Change 'Client Portal' to 'CRM' throughout
- Make logo clickable to expand/collapse sidebar (removed separate button)
- Add proper mobile responsiveness with fixed positioning
- Add PWA safe area insets for standalone mode
- Improve visual alignment and smooth transitions
- Fix rail mode width and spacing issues
2025-07-11 17:20:34 -04:00
Matt 9b045c7b97 fix: Switch to pure Vuetify components for unified sidebar
- Remove Nuxt UI dependency that was causing conflicts
- Use v-navigation-drawer with rail prop for collapsible functionality
- Implement proper Vuetify list components for navigation
- Add responsive behavior with drawer toggle on mobile
- Fix layout structure to work with existing Vuetify setup
2025-07-11 17:04:13 -04:00
Matt 7244349fe7 fix: Resolve 500 error in unified sidebar by using simpler implementation
- Replace problematic UDashboardSidebar components with custom implementation
- Use standard HTML/CSS for sidebar instead of Nuxt UI dashboard components
- Fix 'Cannot destructure property collapsed of undefined' error
- Maintain all features: responsive, role-based nav, clean design
- Ensure compatibility with existing Vuetify components
2025-07-11 16:44:29 -04:00
Matt 61235b163d feat: Implement unified sidebar with Nuxt UI across all dashboard pages
- Install @nuxt/ui and integrate with existing Vuetify
- Create new layouts/dashboard-unified.vue with modern sidebar design
- Features: clean white design, collapsible sidebar, role-based navigation
- Remove old layouts/dashboard.vue to eliminate dual-sidebar confusion
- Update all dashboard pages to use dashboard-unified layout
- Add demo page showcasing new sidebar features
- Fix auth error handler to ignore external service 401 errors
- Ensure consistent navigation experience across entire platform
2025-07-11 16:33:11 -04:00
Matt d71e2d348c feat: Update auth error handler to differentiate between app and external service 401 errors, preventing unnecessary session logouts 2025-07-11 16:10:26 -04:00
Matt eb1d853327 feat: Address 404 errors and session management issues, improve authorization middleware to use cached auth state, and adjust auth refresh plugin for better session validation 2025-07-11 15:05:59 -04:00
Matt 7ee2cb3368 feat: Implement dashboard layout with navigation and role-based access, enhance authentication middleware to clear cache only on actual auth errors, and update expenses page metadata for authorization checks 2025-07-11 14:57:15 -04:00
Matt c6f81a6686 Refactor authentication to use centralized session manager
Extract session management logic from middleware into reusable SessionManager utility to improve reliability, reduce code duplication, and prevent thundering herd issues with jittered cache expiry.
2025-07-11 14:43:50 -04:00
Matt bf2361050f feat: Enhance authentication middleware with reduced cache expiry, improved session validation, and global error handling for auth-related issues 2025-07-11 11:58:38 -04:00
Matt 242e33f7b9 feat: Add "Save & Close" button in InterestDetailsModal, enhance saveInterest function to conditionally close modal, and improve logging in delete-generated-document and get-expenses APIs 2025-07-10 17:36:10 -04:00
Matt 6ebe96bbf4 feat: Improve UI styling in ExpenseDetailsModal and ExpenseList, enhance authentication middleware caching, and optimize PDF generation for receipt fetching 2025-07-10 17:05:08 -04:00
Matt 3ba8542e4f feat: Add currency selection and conversion support in PDF generation, enhance expense processing with target currency handling 2025-07-10 14:02:14 -04:00
Matt 2928d9a7ed feat: Enhance authentication middleware and token refresh logic with improved caching, retry mechanisms, and error handling 2025-07-10 13:31:58 -04:00
Matt 6e99f4f783 feat: Enhance receipt processing in PDF generation with overall receipt numbering and improved path extraction for MinIO 2025-07-10 12:57:43 -04:00
Matt a00b3918be feat: Enhance error handling and logging in expense and interest duplicate detection, add retry logic for document deletion, and improve PDF generation with detailed receipt processing 2025-07-10 09:59:17 -04:00
Matt 06500a614d updates 2025-07-09 22:47:52 -04:00
Matt 9d49245efa refactor: replace Puppeteer with PDFKit for PDF generation
- Updated package.json to remove Puppeteer and add PDFKit and its types.
- Refactored generate-pdf.ts to utilize PDFKit for generating PDFs instead of Puppeteer.
- Implemented functions to add headers, summaries, expense tables, and receipt images using PDFKit.
- Removed HTML content generation and related functions, streamlining the PDF generation process.
- Added error handling for receipt image fetching and improved logging.
2025-07-09 22:38:46 -04:00
Matt 893927d4b1 Refactor expense form and add PDF generation functionality
- Update expense form fields (merchant->establishmentName, amount->price)
- Add PDF generation with Puppeteer integration
- Create PDFOptionsModal component for export options
- Update expense form validation and UI layout
- Add server API endpoint for PDF generation
2025-07-09 22:23:50 -04:00
Matt b6d71faf5f feat: Improve role verification logic in InterestDuplicateNotificationBanner for duplicate checks 2025-07-09 22:08:08 -04:00
Matt 3f90db0392 feat: Update distribution method in EOI document generation to 'NONE' 2025-07-09 21:59:06 -04:00
Matt a83895bef3 feat: Update Documenso configuration in .env.example and refactor generate-eoi-document to use environment variables for recipient IDs and template ID 2025-07-09 21:51:42 -04:00
Matt 4740040202 feat: Improve duplicate check logic in InterestDuplicateNotificationBanner with enhanced role verification and fallback handling 2025-07-09 16:45:48 -04:00
Matt 8f625c0df4 feat: Enhance InterestDuplicateNotificationBanner to always check for duplicates on mount and improve PDF generation to return base64 content 2025-07-09 16:28:04 -04:00
Matt bf24dc9103 feat: Refactor duplicate handling in InterestDuplicateNotificationBanner and update merge API for better access control 2025-07-09 16:11:37 -04:00
Matt 85ec5100f3 feat: Update InterestDuplicateNotificationBanner logic and integrate into interest list page 2025-07-09 15:53:35 -04:00
Matt 1f3f9e2ca8 feat: Add InterestDuplicateNotificationBanner for sales/admin users and implement duplicate detection logic 2025-07-09 15:42:33 -04:00
Matt 5ea9b6ab88 fix: Improve text color contrast for better readability in expense list 2025-07-09 15:35:34 -04:00
Matt a337d3c838 Enhance duplicate detection with sales/admin access and field updates
- Extend duplicate detection access from admin-only to sales/admin users
- Update field names for better clarity (Email → Email Address, etc.)
- Add duplicate notification banner to expenses page
- Improve authorization checks with role-based access control
2025-07-09 15:31:55 -04:00
Matt 147c8b350d fix: Improve text readability in expense cards
 **Fixed Text Legibility Issues:**
- Changed icon colors from text-grey-darken-2 to text-grey-darken-3 for better visibility
- Updated date and payer text colors from light grey to darker rgba(--v-theme-on-surface, 0.8)
- Improved contents preview text color to rgba(--v-theme-on-surface, 0.7)
- Enhanced overall text contrast for better accessibility

� **User Experience Improvements:**
- All text in expense cards is now clearly readable
- Better visual hierarchy with appropriate contrast ratios
- Improved accessibility for users with vision difficulties
- Maintains professional appearance while ensuring legibility
2025-07-09 15:00:32 -04:00
Matt 438312c469 fix: Resolve PDF generation error and improve button spacing
 **Fixed PDF Generation Error:**
- Changed createError to use 'message' instead of 'statusMessage' for long error messages
- Resolves h3 warning about preferring 'message' for longer error messages
- PDF generation now properly calculates totals and provides helpful user feedback

 **Improved Export Button Spacing:**
- Added proper spacing between 'Export Options:' label and buttons (mr-6)
- Increased gap between CSV and PDF buttons (gap-4)
- Changed button size from 'small' to 'default' for better appearance
- Added horizontal padding to buttons (px-6) for consistent sizing
- Wrapped buttons in separate div for better layout control

� **User Experience Improvements:**
- More professional button layout with consistent spacing
- Better visual separation between label and action buttons
- Improved readability and click targets for export actions
- PDF generation provides detailed feedback with calculated totals
2025-07-09 14:55:21 -04:00
Matt b86fd58bcf fix: Resolve remaining expense page issues and PDF generation
 **Fixed PDF Preview Total Calculation:**
- Updated PDFOptionsModal to receive actual expense data instead of just IDs
- Now shows correct total (€308.80) instead of placeholder (€100.00)
- Calculates real amounts from selected expense PriceNumber values

 **Fixed Exchange Rate Time Display:**
- Updated currency utility to calculate minutes since last update
- Changed from showing 'time until expiry' to 'time since update'
- Now displays accurate '59min ago' based on actual update time

 **Improved PDF Generation:**
- Created comprehensive PDF generation system with proper data fetching
- Validates expense data and calculates accurate totals
- Provides detailed error messages with actual expense information
- Shows calculated totals, grouping options, and document settings
- Graceful fallback with helpful guidance for users

� **Technical Improvements:**
- Enhanced currency status API to include minutesSinceUpdate field
- Fixed component prop passing between parent and child components
- Better error handling and user feedback throughout the system
- Maintained CSV export functionality as primary export option

� **User Experience:**
- PDF modal now shows real totals instead of estimates
- Exchange rate status displays meaningful time information
- Clear feedback when PDF generation is attempted
- Comprehensive error messages guide users to alternative solutions

All core functionality now works correctly with accurate calculations and proper time displays!
2025-07-09 14:46:10 -04:00
Matt ef23cc911e fix: Address remaining expense page UI issues and functionality
� Enhanced Visual Design:
- Improved form spacing in date range filters with proper responsive grid layout
- Added 'Converted' chip tags to show currency conversion status clearly
- Better field spacing and padding throughout the expense page
- Enhanced button sizes and spacing for better visual hierarchy

 Improved User Experience:
- Added conversion indicators with blue 'Converted' chips for foreign currencies
- Better visual feedback for converted prices with USD amounts
- Improved spacing and layout consistency across all components
- Enhanced responsive design for mobile and desktop

� Technical Improvements:
- Fixed PDF generation to show helpful error message instead of crashing
- Added edit button to ExpenseDetailsModal (with placeholder functionality)
- Improved component structure and prop handling
- Better error handling and user feedback for PDF generation

� UI/UX Enhancements:
- Replaced compact density with comfortable for better touch targets
- Added proper v-row/v-col structure for consistent spacing
- Improved button sizing and visual weight
- Better color contrast and accessibility

� Functionality Updates:
- PDF generation now shows informative error message instead of technical failure
- Edit button added to expense details (ready for future implementation)
- Better currency display with conversion status indicators
- Improved form layouts and field spacing

The expense page now has professional spacing, clear currency indicators, and handles edge cases gracefully.
2025-07-09 14:27:28 -04:00
Matt 7cf2ba6a83 fix: Complete expense page UI improvements and modal redesign
� UI/UX Improvements:
- Fixed currency display in ExpenseList to show proper currency symbols
- Improved color contrast by using darker grey variants for better visibility
- Updated ExpenseDetailsModal to use modern Vuetify components
- Redesigned PDFOptionsModal with proper Vuetify form elements

 Enhanced User Experience:
- Cards now properly display currency with symbols (€, $, etc.)
- Better visual hierarchy with improved contrast ratios
- Smooth transitions and hover effects maintained
- Professional modal designs with consistent spacing

� Technical Fixes:
- Converted all Tailwind CSS to Vuetify components for consistency
- Fixed TypeScript integration issues
- Improved component props and event handling
- Better responsive design for mobile and desktop

� Responsive Design:
- Mobile-optimized expense cards and modals
- Proper grid layouts that adapt to screen sizes
- Touch-friendly interactions on mobile devices

The expense page now has a cohesive, professional design that matches the quality of other dashboard components while maintaining full functionality.
2025-07-09 14:16:50 -04:00
Matt 7ba8c98663 feat: Implement expense creation modal and API integration
- Added ExpenseCreateModal component for adding new expenses with form validation.
- Integrated API endpoint for creating expenses, ensuring only authorized users can access it.
- Updated dashboard to include functionality for adding expenses and refreshing the expense list after creation.
- Enhanced UI with Vuetify components for better user experience and responsiveness.
2025-07-09 13:58:38 -04:00
Matt ac7176ff17 Refactor duplicate handling to allow any authenticated user to check for duplicates, update API methods to require general authentication, and enhance expense fetching with improved error handling and logging. 2025-07-09 13:29:52 -04:00
Matt 587c9b6422 Add time formatting utilities with error handling for time and full datetime 2025-07-09 13:03:21 -04:00
Matt da9ab99519 Enhance authorization and authentication handling by optimizing state synchronization from middleware cache, implementing error handling in custom auth, and adding admin audit and system logs pages with filtering and real-time updates. 2025-07-09 13:00:01 -04:00
Matt 36048dfed1 Optimize auth initialization by using cached middleware state
- Replace API calls with cached auth state from middleware in useAuthorization
- Add fallback to session cache and watchers for auth state updates
- Change initialization from async to synchronous for better performance
- Add DuplicateNotificationBanner component
2025-07-09 12:43:24 -04:00
Matt 3615e2fa9b Add duplicate management interface with scanning and merging functionality 2025-07-09 12:32:12 -04:00
Matt 4a60782f89 Implement admin functionality for merging duplicate records with error handling and logging 2025-07-09 12:21:41 -04:00
Matt b3e7d04b86 Enhance authorization handling by syncing auth state from Nuxt payload and loading from API if necessary; improve dashboard logging for user roles and groups 2025-07-09 12:12:13 -04:00
Matt 280a27cc2f Add admin console with role-based navigation and enhanced API auth
- Add conditional admin menu items to dashboard based on user permissions
- Upgrade expense API authorization from basic auth to sales/admin roles
- Convert static menu arrays to computed properties for dynamic content
- Add admin duplicates API endpoint structure
2025-07-09 11:59:06 -04:00
Matt f8d5e4d7e2 Add role-based authorization system with admin functionality
- Implement authorization middleware and composables for role checking
- Add groups/roles support to authentication and session management
- Create admin dashboard pages and API endpoints
- Add audit logging utility for tracking user actions
- Enhance expense page with role-based access control
- Improve session caching with authorization state management
2025-07-09 10:40:27 -04:00
Matt 2774b4050f Improve mobile responsiveness across expense tracking interface
- Add horizontal margins to modals on mobile devices
- Optimize grid layouts with smaller breakpoints (md→sm)
- Make action buttons full-width on mobile with touch optimization
- Adjust text sizes and spacing for better mobile readability
- Enhance date filter and export controls for mobile interaction
2025-07-04 10:44:42 -04:00
Matt e66d6ad1f2 Add processing fee option to PDF export modal
- Add checkbox to include 5% processing fee in PDF exports
- Install PDF generation dependencies (@pdfme/common, @pdfme/generator, sharp)
- Add server-side expenses API endpoints
- Update PDF options interface to support processing fee toggle
2025-07-04 09:27:43 -04:00