As a frontend developer, implement the LoginNavbar section for the Login page. This section renders a responsive navigation bar using a `LogoCube` 3D component built with `@react-three/fiber` Canvas, `RoundedBox` from `@react-three/drei`, and `useFrame` for continuous Y-axis rotation and sinusoidal X-axis oscillation. The navbar uses `useState` for `scrolled`, `menuOpen`, and `isDark` (theme toggle) state, with `useEffect` for scroll detection (`window.scrollY > 10`) and click-outside menu dismissal via `navRef`. Includes `useCallback`-memoized `toggleTheme` and `toggleMenu` handlers. Applies `.ln-scrolled` class conditionally on scroll. Note: this is a root page with no cross-page dependencies.
As a backend developer, implement JWT-based authentication API endpoints: POST /api/auth/login (validate credentials, return JWT access+refresh tokens), POST /api/auth/logout (invalidate session), POST /api/auth/refresh (rotate refresh token), GET /api/auth/me (return current user profile with roles and permissions). Enforce password hashing (bcrypt), session timeout, and audit log entry on each login/logout event. Note: frontend section tasks for LoginForm (0895740a) and BillValidationNavbar (211a9ce9) depend on these endpoints being available. Exclude docker-compose and k8s setup as those are already done.
As a backend developer, design and run database migrations for all core models in PostgreSQL/MySQL: (1) users (id, name, email, password_hash, department, status, last_login, created_at, updated_at), (2) roles (id, name, type, department, description, status, created_by, modified_by), (3) role_permissions (role_id, module, permission_key), (4) role_folder_access (role_id, folder_id, view, upload, edit, delete), (5) invoices (id, erp_invoice_id, bill_number, vendor_name, amount, net_amount, gst_amount, billing_date, due_date, department, employee_email, party_details, erp_status, validation_result, processed_at), (6) validation_logs (id, invoice_id, ocr_raw, ai_raw, field_comparisons JSON, status, confidence_scores JSON, processed_by, duration_ms, created_at), (7) documents (id, file_name, file_path, file_size, department, folder_path, tags, uploaded_by, upload_timestamp, mime_type), (8) qr_codes (id, file_id, department, folder_path, status, created_at), (9) qr_tracking_events (id, qr_code_id, user_id, status, remarks, timestamp, ip), (10) audit_logs (id, datetime, user_id, module, action, entity, entity_id, status, ip, session, details, mismatch JSON, duration_ms, user_agent), (11) notifications (id, user_id, type, title, description, read, created_at, related_entity_id). Create seed data for development/testing.
As a frontend developer, establish the shared design system and CSS token layer used across all 11 pages: (1) define CSS custom properties for the light theme color palette (primary blues #1e40af/#3b82f6, success green #059669/#10b981, warning amber #f59e0b, danger red #ef4444, neutral grays, background whites), matching the light theme requested by the user; (2) create shared base CSS files for typography scale, spacing scale, border-radius tokens, shadow tokens, and z-index scale; (3) implement shared component CSS for common patterns: badge variants (success/warning/danger/info), status dots with pulse animation, progress bar base styles, avatar circle base styles, gradient-line decorative elements; (4) ensure @react-three/fiber Canvas wrapper styles are consistent across 3D sections (DashboardWelcomeBanner, QRDashboard, WelcomeBanner orb, KeyFeatures); (5) document token names used by DashboardHeader, ValidationDashboard, DMSDashboard, QRDashboard accent CSS variable patterns.
As a frontend developer, implement the LoginHero section for the Login page. This section renders a full-bleed WebGL background using `@react-three/fiber` Canvas containing two animated sub-components: `WavePlane` â a `THREE.PlaneGeometry(14, 8, 96, 96)` mesh with per-vertex Z displacement computed each frame via `useFrame` using sinusoidal functions of x, y, and elapsed time, rendered as wireframe with opacity 0.12; and `FloatingParticles` â 120 `THREE.Points` with `Float32Array` positions animated via `useFrame` using per-particle frequency/amplitude/phase parameters stored in `useMemo`. The hero overlay content (headline, subheadline, CTA) sits above the Canvas. This section is independent of LoginForm and LoginSocialAuth.
As a frontend developer, implement the LoginForm section for the Login page. This section renders a `motion.div` card with 3D tilt driven by `useMotionValue`/`useSpring`/`useTransform` from `framer-motion`, tracking mouse position relative to `cardRef` to compute `rotateX` and `rotateY` spring values (Âą6°). A `glowRef` div follows cursor position within the card. Form state includes `email`, `password`, `showPassword`, `remember`, `isLoading`, `emailTouched`, and `passwordTouched`. Inline validation uses an email regex and password length âĨ 6 check; inputs receive `.lf-input-error` or `.lf-input-valid` classes accordingly. Icons from `lucide-react` (`Mail`, `Lock`, `Eye`, `EyeOff`, `Check`, `X`, `ShieldCheck`) are used. `handleSubmit` simulates a 2200ms API call via `setTimeout`. This section is independent of LoginHero and LoginSocialAuth.
As a frontend developer, implement the LoginSocialAuth section for the Login page. This section renders three OAuth provider buttons (Google, Microsoft, Enterprise SSO) defined in a `providers` array, each with inline SVG icons. Each button uses a `btnRefs` ref map and `handleMouseMove`/`handleMouseLeave` callbacks to apply subtle magnetic translate transforms (`deltaX * 3px`, `deltaY * 2px`) and reposition a `.lsa-btn-highlight` radial glow at cursor position. A `loadingId` state drives a simulated 2400ms loading spinner per button via `setTimeout`. A divider element separates this section from the main form. This section is independent of LoginForm and LoginHero.
As a frontend developer, implement the LoginSupport section for the Login page. This section renders three support link cards defined in the `supportLinks` array with icons from `lucide-react` (`Headphones`, `KeyRound`, `Activity`, `Mail`, `ChevronRight`). Each `.ls-link-item` anchor uses `itemRefs` ref map with `handleMouseMove`/`handleMouseLeave` callbacks that compute `--ls-mx`/`--ls-my` CSS custom properties for a radial highlight and apply a magnetic translate effect (`dx * 4px`, `dy * 3px`) via `el.style.transform`. Each card also displays a tooltip span and an icon wrapper with per-item modifier classes (`ls-icon-wrap--contact`, `ls-icon-wrap--reset`, `ls-icon-wrap--status`). Section heading uses `aria-labelledby` for accessibility. This section is independent of LoginForm and LoginSocialAuth.
As a frontend developer, implement the Footer section for the Login page. This section renders a `<footer>` with a `.ftr-gradient-line` decorative top border, a copyright line featuring the `.ftr-brand` span, a footer nav with three links (`Privacy Policy`, `Terms of Service`, `Contact Support`) separated by `.ftr-pipe` spans rendered via `React.Fragment`, and a social links row with Linkedin, Twitter, and Github icons from `lucide-react` opening in `_blank` with `rel='noopener noreferrer'`. Note: this Footer component may already exist from other pages in the project â check for reuse before reimplementing.
As a frontend developer, implement the DashboardHeader section for the Dashboard page. This section renders a sticky header (dh-root/dh-sticky classes toggled via scroll listener using useState/useEffect) with: (1) left side breadcrumb nav showing 'calm-document âē [active module label]' and a dynamic page title; (2) center quick-filter pill buttons (Today/7d/30d/Quarter) using handleFilterClick useCallback that updates activeFilter state and computes dateFrom/dateTo ISO strings; (3) a module selector dropdown (moduleOptions array with All Modules, Bill Validation, DMS, QR File Tracking, Audit Logs) using selectedModule state; (4) manual date range inputs (dateFrom/dateTo) pre-populated via getTodayISO/get30DaysAgoISO helpers; (5) a refresh button with refreshing spinner state (700ms timeout via handleRefresh). Imports DashboardHeader.css. Note: this is the first/layout section of the Dashboard page and must chain from the Login page Navbar task.
As a backend developer, implement Role-Based Access Control API endpoints: GET/POST/PUT/DELETE /api/roles (CRUD for roles), GET/POST/PUT /api/roles/{id}/permissions (assign/update permissions per module), GET/POST /api/roles/{id}/folder-access (configure folder-level access per role), GET /api/permissions (list all available permissions grouped by module: Bill Validation 8 perms, DMS 7 perms, QR Tracking 6 perms). Enforce backend-level authorization middleware on all protected routes. Support role types: System, Administrative, Operational, Auditor, Viewer, Custom. Note: RoleManagementPermissions (799c39c2), RoleManagementFolderAccess (56836653), and RoleManagementSidebar (7b020abc) frontend tasks depend on these endpoints.
As a backend developer, implement the ERP integration layer to fetch invoice data from the on-premise ERP database via read-only access: GET /api/erp/invoices (list invoices with filters: department, date range, status), GET /api/erp/invoices/{id} (fetch single invoice with all fields: bill_number, amount, due_date, billing_date, net_amount, gst_taxes, vendor_name, invoice_made_by, employee_email, party_details), GET /api/erp/invoices/{id}/document (retrieve uploaded invoice PDF from ERP storage). Implement connection pooling, error handling for ERP unavailability, and caching for frequently accessed records. Note: InvoiceList (67bfad59) and MismatchComparison (4adfaf5b) frontend tasks require this layer. Depends on backend_auth_api for protected access.
As a backend developer, implement the centralized audit logging API: GET /api/audit-logs (paginated list with filters: module, department, user, action, status, date_from, date_to, log_type), GET /api/audit-logs/{id} (full log entry details including mismatch data, IP, session, userAgent, duration), POST /api/audit-logs/export (generate CSV/Excel/PDF export with configurable columns, grouping, date range â returns download URL or sends to email). Auto-log entries for all system events: login/logout, invoice validation, file uploads/downloads, QR scan/status updates, role changes, user CRUD. Log fields: datetime, user, module (Bill Validation/DMS/QR Tracking/User Mgmt/Auth), action, entity, entityId, status (Success/Failed/Warning/Info), ip, session, details, mismatch, duration, userAgent. Note: AuditLogsTable (0eddac9d), AuditLogsExport (eeb22f18) frontend tasks depend on these endpoints.
As a frontend developer, implement the DashboardSidebar section for the Dashboard page. This section renders a collapsible sidebar with two navigation groups: (1) mainNavItems array (Bill Validation /BillValidation badge='43', Document Management /DMS badge='284', QR File Tracking /QRTracking badge='396', Audit Logs /AuditLogs no badge) each with inline SVG icons (dsb-nav-icon class); (2) analyticsNavItems array (Validation Logs, Dept. Analytics, Notifications badge='3') with bar-chart, pie-chart, and bell SVG icons. Active nav item is determined by comparing href against window.location.pathname (currentPath). Uses useState for collapsed/expanded sidebar toggle. Imports DashboardSidebar.css. Component may already exist from a prior page if shared.
As a frontend developer, implement the DashboardWelcomeBanner section for the Dashboard page. This section features: (1) a @react-three/fiber Canvas rendering a RoleOrb component â an animated octahedron mesh (meshStandardMaterial color='#1e40af', emissive='#3b82f6', metalness=0.8) with a torus ring, driven by useFrame for continuous rotation/float animation, with ambientLight, directionalLight, and two pointLights; (2) a left panel (dwb-left) showing greeting 'Welcome back, Rajesh Kumar', ROLE_DATA badge (Finance Approver, color #3b82f6), and a live clock/date updated every 1000ms via setInterval in useEffect (toLocaleTimeString/toLocaleDateString en-IN locale); (3) three quickStats cards (Review Required=24 accent-yellow, Invoices Validated=218 accent-green, Files Pending Return=396 accent-blue); (4) dwb-bg-glow decorative background element. Imports THREE, Canvas, useFrame from @react-three/fiber and DashboardWelcomeBanner.css.
As a frontend developer, implement the ValidationDashboard section for the Dashboard page. This section renders: (1) six metricCards (Total Invoices=342 vd-accent-primary, Validated=218 vd-accent-secondary, Partial Match=81 vd-accent-warning, Failed=43 vd-accent-danger, Manual Review=24 vd-accent-warning, Mismatch Alerts Sent with vd-accent-* classes) each with inline SVG icons, trend values, and trendDir (up/down/neutral); (2) a react-chartjs-2 Line chart using ChartJS registered with CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Filler â displaying invoice validation trend data with area fill; useRef for chart instance and useState for chart data. Imports ChartJS, Line from react-chartjs-2, and ValidationDashboard.css.
As a frontend developer, implement the DMSDashboard section for the Dashboard page. This section renders: (1) four metricCards (Total Documents=12,847 accent-green/FileText, Recent Uploads=284 accent-blue/Upload, Storage Used=48.6 GB accent-amber/HardDrive, Active Users=67 accent-purple/Users) using lucide-react icons with TrendIcon component (TrendingUp/TrendingDown/Minus based on trendDir); (2) a recentUploads table listing 6 files with user avatar initials (colored circles), file type badges (pdf/docx/xlsx/zip), uploadedBy, uploadDate, fileSize, and action buttons (Eye/Download via lucide-react); (3) folderSummary section with 5 department folders showing progress bars (count/maxCount ratio) using FolderOpen/Folder icons; (4) a search bar and dropdown filter using useState. Imports lucide-react icons and DMSDashboard.css.
As a frontend developer, implement the QRDashboard section for the Dashboard page. This section features: (1) a @react-three/fiber Canvas with a 3D QR-themed animated mesh (useRef/useFrame for continuous rotation), ambientLight and directional lighting using THREE; (2) four METRICS cards (QR-Mapped Files=14,280 accentVar='#f59e0b', Available=11,043 accentVar='#059669', Taken=2,841 accentVar='#3b82f6', Pending Return=396 accentVar='#ef4444') each with custom iconBg/iconBgHover CSS variables, inline SVG icons, and sub-label text; (3) a TIMELINE activity feed listing recent QR scan events (user, dept, status badges: qrd-status-taken/returned/available, time, fileId) for users Rajesh Kumar/Priya Sharma/Anil Mehta/Sunita Patel/Vikram Singh. Imports Canvas/useFrame from @react-three/fiber, THREE, and QRDashboard.css.
As a frontend developer, implement the DepartmentAnalytics section for the Dashboard page. This section renders: (1) a toggle (showAll state) switching between ALL_DEPTS (Marketing=87%, Contracting=74%, Purchase=92%) and MY_DEPT (Marketing only) horizontal bar charts with IntersectionObserver-triggered CSS animation (barsAnimated state, 0.15 threshold, barsTriggered ref); (2) a pure SVG donut chart built from DONUT_SEGMENTS (Returned On-Time=58% #059669, Returned Late=27% #f59e0b, Pending Return=15% #ef4444) using buildDonutProps helper computing strokeDasharray/strokeDashoffset on a circle r=70 â donutAnimated state triggers transition; (3) a 30-day upload trend SVG area chart built via buildAreaPath helper plotting 30 data points, with areaHover state for tooltip on mousemove (svgRef); (4) a tooltip state object {visible, x, y, label, value} rendered absolutely. Uses BarChart2/Download/TrendingUp from lucide-react. Imports DepartmentAnalytics.css.
As a frontend developer, implement the AuditLogs section for the Dashboard page. This section renders a full audit log table with: (1) ALL_LOGS static dataset of 15+ log entries with fields: id, datetime, user, module (Bill Validation/DMS/QR Tracking/User Mgmt/Auth), action, details, status (Success/Failed/Warning/Info); (2) useMemo-filtered and sorted log list â filter controls include Search input (Shield/Search/X icons from lucide-react), module dropdown, status dropdown, and date range; (3) sortable column headers (ChevronUp/ChevronDown icons) with sort state tracking field+direction; (4) paginated table rows (ChevronLeft/ChevronRight pagination, useCallback for page handlers); (5) a detail drawer/modal triggered on row click showing full log details with AlertCircle/FileText icons; (6) a Download button for CSV export. Imports lucide-react (Shield, Search, Download, FileText, ChevronUp, ChevronDown, ChevronLeft, ChevronRight, X, AlertCircle) and AuditLogs.css.
As a frontend developer, implement the BillValidationNavbar section for the BillValidation page. This reuses the LoginNavbar component (may already exist from the Login page) and includes a 3D animated LogoCube rendered via @react-three/fiber Canvas with RoundedBox from @react-three/drei â a rounded document-shaped mesh with emissive blue line planes and a green square accent, all rotating via useFrame. The LoginNavbar functional component manages three state hooks: scrolled (scroll position via passive window listener), menuOpen (click-outside detection using navRef and document mousedown listener), and isDark (theme toggle via useCallback). The navbar applies ln-scrolled CSS class dynamically on scroll, renders the 3D Canvas logo, and includes responsive mobile menu toggle. Import from '../styles/LoginNavbar.css'. Depends on Dashboard page's DashboardHeader task to establish page-level chain.
As a frontend developer, implement the LoginNavbar section for the DMS page. This section renders a responsive navigation bar using the `LoginNavbar` component with the following features: a 3D animated `LogoCube` built with `@react-three/fiber` and `@react-three/drei` (`RoundedBox`, `planeGeometry` meshes with emissive blue/green materials) that rotates continuously via `useFrame`; scroll-aware styling using `useState(scrolled)` and a passive `window.scroll` listener that toggles the `ln-scrolled` class; a hamburger mobile menu controlled by `useState(menuOpen)` with a `useEffect` click-outside handler via `navRef`; a dark/light theme toggle via `useState(isDark)` and `useCallback(toggleTheme)`; and accessible `role='navigation'` and `aria-label` attributes. Note: this component may already exist from a previous page â reuse if available. Depends on Dashboard page task to establish page chain.
As a frontend developer, implement the QRTrackingNavbar section for the QRTracking page. This reuses the LoginNavbar component pattern (imported from '../styles/LoginNavbar.css') and features a 3D animated LogoCube rendered via @react-three/fiber Canvas with RoundedBox from @react-three/drei. The cube uses useFrame for continuous y-rotation and sinusoidal x-rotation, with meshStandardMaterial planes representing document lines and a green status indicator. The LoginNavbar component manages three state hooks: scrolled (window.scrollY > 10 scroll listener), menuOpen (click-outside detection via navRef useRef), and isDark (theme toggle via useCallback). Includes toggleTheme and toggleMenu callbacks. Component may already exist from DMS or BillValidation pages â check for reuse before reimplementing.
As a frontend developer, implement the AdminNavBar section for the UserManagement page. This reuses the LoginNavbar component (may already exist from previous pages) featuring a 3D animated LogoCube rendered via @react-three/fiber Canvas with RoundedBox from @react-three/drei â the cube uses useFrame for continuous Y-axis rotation and sinusoidal X-axis oscillation, with meshStandardMaterial planes overlaid for document-like detail. The navbar tracks scroll state via useEffect/window scroll listener (ln-scrolled class), manages a hamburger menuOpen state with click-outside detection using navRef, and includes a toggleTheme callback (isDark state). Imports LoginNavbar.css. Wire up page-level dependency to Dashboard page task.
As a frontend developer, implement the NotificationsHeader section for the Notifications page. This section renders a header with `useState` managing `markedAll` (boolean) and `unreadCount` (initialized to `INITIAL_UNREAD = 12`). The `handleMarkAll` handler sets `markedAll` to true and resets `unreadCount` to 0. The UI conditionally renders a `.nh-badge` span with the live unread count and a `.nh-badge-label` ('unread' vs 'all caught up') based on `markedAll` state. A `CheckCheck` icon button from `lucide-react` triggers mark-all, becoming disabled and switching label to 'All Marked Read' once activated. A `stats` array of three items (Validation Alerts: 5, Document Uploads: 4, File Tracking: 3) is mapped into `.nh-stat-item` role='listitem' elements with color-coded `.nh-stat-dot` modifier classes; counts render as 0 when `markedAll` is true. Page-level dependency on Dashboard is chained here via depends_on.
As a backend developer, implement user management API endpoints: GET /api/users (paginated list with filters: department, role, status, search), POST /api/users (create user with role assignment), PUT /api/users/{id} (update user profile, status, role), DELETE /api/users/{id} (soft delete), POST /api/users/{id}/reset-password (trigger password reset), POST /api/users/bulk (bulk role assignment, status change, export). Each user object includes: name, email, department, role, status (Active/Inactive/Suspended), last_login, created_at. Department options: Marketing, Contracting, Purchase, Finance, IT, HR. Note: UserListSection (426d0284), UserActionsPanel (61eb025e), BulkActionsSection (0f1458c8) frontend tasks depend on these endpoints.
As a backend developer, implement the OCR and AI-based invoice data extraction engine: POST /api/ocr/extract (accepts invoice PDF, runs OCR pipeline, returns extracted fields: bill_number, amount, due_date, billing_date, net_amount, gst_taxes, vendor_name, invoice_made_by, employee_email, party_details with confidence scores per field), POST /api/ocr/batch (batch extraction for multiple invoices). The engine should handle multi-format invoice parsing, data normalization, OCR error handling, and log extraction results to the OCR extraction log. Integrate with AI APIs for vendor name extraction, tax field identification, and invoice field detection. Store extraction logs with timestamps and confidence scores. Note: ValidationLogsTable (5236e615) and ValidationLogsDetailModal (cfe94307) display OCR confidence scores from this service.
As a backend developer, implement the Document Management System API: POST /api/dms/upload (single file upload with metadata: department, tags, folder_path; supports PDF/DOC/DOCX/XLS/XLSX/JPG/PNG/ZIP), POST /api/dms/upload/bulk (bulk upload), GET /api/dms/files (paginated list with filters: file_name, department, upload_date, tags), GET /api/dms/files/{id} (file metadata + presigned download URL), DELETE /api/dms/files/{id}, PUT /api/dms/files/{id}/metadata (edit tags, categories), GET /api/dms/folders (folder tree structure with RBAC-filtered visibility), POST /api/dms/folders (create folder), GET /api/dms/stats (total docs, recent uploads count, storage used GB, active users count). Enforce folder-level RBAC access checks per user role. Integrate with S3-compatible secure file storage. File metadata fields: file_name, department, uploaded_by, upload_timestamp, tags, file_size. Note: DMSDashboard (85c7979c), FileRegistrySection (0a984328) depend on these endpoints.
As a backend developer, implement the QR code generation and tracking API: POST /api/qr/generate (generate single QR code mapped to: file_id, department, folder_path â returns QR image and unique QR code ID), POST /api/qr/generate/bulk (bulk generation of 15,000â30,000 QR codes, returns downloadable ZIP batch), GET /api/qr/codes (paginated registry with filters: department, status â Available/Taken/Returned), GET /api/qr/codes/{id} (QR details with tracking history), PUT /api/qr/codes/{id}/status (update status with user, department, date_time, remarks â triggers audit log entry), GET /api/qr/stats (QR-mapped count, available, taken, pending_return counts), GET /api/qr/pending-returns (list of files with daysOverdue). Use Python QR libraries per SRD tech stack. Note: QRGenerationPanel (2d90fe4d), QRDashboard (b8d1f093), PendingReturnsSection (6edee9f4) depend on these endpoints.
As a frontend developer, set up the global state management and API client layer for the React application: (1) configure a centralized API client (axios/fetch wrapper) with JWT token injection via request interceptors, automatic token refresh on 401 responses, and error handling middleware; (2) implement a global auth context (React Context + useReducer or Zustand) storing currentUser, roles, permissions, and isAuthenticated â consumed by all protected route components; (3) implement a permissions utility hook (usePermission) that checks per-module permission keys against the RBAC permission set loaded at login; (4) set up React Router protected route wrappers that redirect unauthenticated users to /Login and unauthorized users to an access-denied state; (5) configure a global notification/toast context reused across all pages. This layer is required before any API-connected frontend section tasks can function end-to-end.
As a frontend developer, implement the BillValidationHeader section for the BillValidation page. The BillValidationHeader component uses a useState hook (workflowOpen) to toggle a 7-step workflow accordion/modal. The header renders: a breadcrumb nav linking Dashboard â Bill Validation, a live status badge with animated dot ('System Active'), a main h1 heading with bvh-title-accent span, and department chips for Marketing, Contracting, and Purchase (from a static departments array with active flags). The WORKFLOW_STEPS array contains 7 steps covering ERP Data Fetch, Document Retrieval, OCR + AI Extraction, Field Comparison, Validation Result, Email Notification, and Audit Logging â each with step number, label, and description. Import from '../styles/BillValidationHeader.css'.
As a frontend developer, implement the ValidationStats section for the BillValidation page. Renders a row of five StatCard components driven by a static stats array with variants: total (1284 invoices), validated (892, 69.5%), partial (187, 14.6%), failed (143, 11.1%), and review (62, 4.8%). Each StatCard displays a Lucide icon (FileText, CheckCircle, AlertTriangle, XCircle, Eye), a vs-badge with change percentage using TrendIcon (TrendingUp, TrendingDown, or Minus from lucide-react), a count, label, and an ARIA-compliant progressbar div with inline width style set to progressPct. A summaryChips row renders four variant-colored chips below the cards. Badge color logic is contextual â up/down changeType maps differently for positive vs negative metrics. Import from '../styles/ValidationStats.css'.
As a frontend developer, implement the InvoiceFilters section for the BillValidation page. The InvoiceFilters component manages 8 state hooks: department, status, dateFrom, dateTo, billNumber, vendor, employee (filter values), mobileOpen (mobile panel toggle), and mobileSections (accordion state object for 6 mobile sections: Department, Status, Date Range, Bill Number, Vendor, Employee). Renders a desktop filter bar with: department select (DEPARTMENTS array, 4 options), status tab strip (STATUS_TABS array with 5 keys: all/validated/partial/failed/review, each with dotClass and tabClass), date range inputs (From/To), bill number input with Hash icon, vendor text input with Search icon, employee select (EMPLOYEES array, 6 options with Indian names). A buildChips() function dynamically generates removable filter chips with X icons. Mobile view uses toggleMobileSection (useCallback) to accordion-expand each filter section. Includes a Clear All reset button. Import from '../styles/InvoiceFilters.css'.
As a frontend developer, implement the InvoiceList section for the BillValidation page. The InvoiceList component uses useState for sortField, sortDir, selectedIds (Set for row checkboxes), page, and pageSize; and useMemo for sorted/paginated invoice slices from a static INVOICES array of 8+ invoice objects (each with id, vendor, amount, netAmount, gstAmount, billingDate, dueDate, department, erpStatus, extractedStatus, validationResult, poNumber, invoiceMadeBy, employeeEmail, partyDetails, mismatchCount, processingTime, notes). Renders a sortable table with ArrowUpDown column headers, status badge cells using Lucide icons (CheckCircle, AlertTriangle, XCircle, Clock, Eye) mapped by validationResult, a mismatch count badge, per-row checkboxes with bulk select header checkbox, ChevronRight detail button, and Download icon. Includes pagination controls. Import from '../styles/InvoiceList.css'.
As a frontend developer, implement the MismatchComparison section for the BillValidation page. The MismatchComparison component uses useState to track selectedInvoice (currently active invoice from the invoices array) and expandedFields (Set of field keys with expanded subRows). Renders an invoice selector list on the left showing invoice IDs and vendors with mismatch/validated status badges. The main comparison panel renders a table of field rows â each row shows field label, ERP value, extracted value, and a status icon (CheckCircle for match, XCircle for mismatch, AlertTriangle for warning). Rows with expandable: true (e.g., tax_amount with CGST/SGST/IGST sub-rows) toggle via ChevronDown to reveal indented subRow breakdown. Numeric fields display values in a monospace/numeric style. Example invoice INV-2024-0847 (Apex Technologies Ltd.) shows vendor_name mismatch ('Apex Technologies Ltd.' vs 'Apex Technologies Limited'), tax_amount mismatch (15,210 vs 14,890) with expandable tax component sub-rows. Import from '../styles/MismatchComparison.css'.
As a frontend developer, implement the ApprovalPanel section for the BillValidation page. The ApprovalPanel component manages three state hooks: notes (textarea value), approveAsIs (boolean toggle for 'Approve as-is despite mismatches' checkbox row with CheckSquare icon), and feedback (object with type and message for transient notification, auto-cleared via setTimeout after 5000ms). Renders a panel header with a pulsing 'Manual Review Required' status badge and invoice reference 'INV-2024-00847'. The body uses a desktop two-column layout (ap-layout-desktop): left column has a notes textarea (id='ap-notes') with MessageSquare label and audit-trail hint text, plus the approveAsIs toggle row styled conditionally with ap-toggle-checked class. Right column contains three action buttons: Approve (CheckCircle icon, handleApprove), Reject (XCircle icon, handleReject), and Escalate (ArrowUpCircle icon, handleEscalate) â each triggering feedback state with type-specific messages about INV-2024-00847. Feedback banner renders conditionally with type-based styling. Import from '../styles/ApprovalPanel.css'.
As a frontend developer, implement the ValidationLogs section for the BillValidation page. The ValidationLogs component uses useState to manage expandedLog (currently expanded log entry ID) and a filter/search state for log entries. The LOG_DATA array contains 4+ log entries, each with: id, date, time, action (validated/partial/failed/manual), actionLabel, user with userInitials and avatarBg/avatarColor for colored avatar chips, department with deptClass (marketing/contracting/purchase), ocrStatus/ocrLabel, aiStatus/aiLabel, duration, invoiceRef, vendor, amount, ocrDetail, aiDetail, employeeEmail, and note. Each log row renders: timestamp, colored user avatar chip, department badge, action status badge, invoice ref and vendor, amount, OCR status pill, AI status pill, processing duration, and a ChevronRight expand toggle. Expanded rows reveal ocrDetail, aiDetail, employeeEmail, and note fields. Header includes a Download button (FileText + Download icons) for log export. Import from '../styles/ValidationLogs.css'.
As a frontend developer, implement the Footer section for the BillValidation page. This reuses the shared Footer component (may already exist from the Login page â dbcb8f8c-46e5-4913-9fd9-61579452e9b6). Renders a footer with a ftr-gradient-line accent, copyright text with ftr-brand span ('calm-document'), a footer nav with three links (Privacy Policy â /Privacy, Terms of Service â /Terms, Contact Support â /Login) separated by ftr-pipe spans, and a social links row with three icon buttons using Lucide icons: Linkedin, Twitter, Github â each as an external anchor with target='_blank' and aria-label. Import from '../styles/Footer.css'.
As a frontend developer, implement the ValidationLogsNavbar section for the ValidationLogs page. This reuses the LoginNavbar component pattern (importing from '../styles/LoginNavbar.css') and features a 3D animated LogoCube rendered via @react-three/fiber Canvas with RoundedBox from @react-three/drei. The cube uses useFrame for continuous Y-axis rotation (t * 0.4) and sinusoidal X-axis tilt, with meshStandardMaterial layers for document lines and a green square accent. The LoginNavbar component manages three state hooks: scrolled (scroll listener with passive:true), menuOpen (click-outside handler via useRef navRef), and isDark (theme toggle via useCallback). This component may already exist from the Login page â verify before rebuilding. Chain page-level dependency from BillValidation Navbar task.
As a frontend developer, implement the DMSHero section for the DMS page. This section renders a full-bleed hero using `@react-three/fiber` with a `DocumentNodes` component that creates 28 floating mesh nodes via `React.useMemo` â three geometry types: `boxGeometry` for documents (blue, `#3b82f6`), QR squares (green, `#059669`), and checkmark slabs (amber, `#f59e0b`) â each with transparent `meshStandardMaterial` and per-node emissive intensity. A `useFrame` loop animates vertical oscillation (`Math.sin`), Y-axis rotation, and Z-axis sway per node using stored `speed`, `phase`, and `y` properties from `nodeData`. A central glowing sphere (`sphereGeometry args=[0.7]`, blue emissive) and a `torusGeometry` ring orbit are rendered at position `[0,0,-1]`. The outer `groupRef` slowly rotates on Y via `state.clock.elapsedTime * 0.04`.
As a frontend developer, implement the ModulesOverview section for the DMS page. This section renders three module cards defined in a static `modules` array: Bill Validation System (`id: 'bill'`, tag `mo-card-tag--bill`, CTA href `/BillValidation`), Document Management System (`id: 'dms'`, tag `mo-card-tag--dms`, CTA href `/DMS`), and QR Tracking (`id: 'qr'`, tag `mo-card-tag--qr`). Each card renders: a module icon (inline SVG with `viewBox='0 0 24 24'`), a tag badge, title, description, a features list with badge labels (OCR, AI, ERP, RBAC, Bulk, Search, Meta, DL), and a CTA anchor. Cards use per-module CSS classes for glow, icon wrapper, and CTA coloring (`mo-card-glow--*`, `mo-icon-wrapper--*`, `mo-card-cta--*`). Pure static JSX â no state or animations.
As a frontend developer, implement the KeyFeatures section for the DMS page. This section renders a tabbed feature showcase using a `FEATURES` array of four items: OCR & AI Extraction (`id: 'ocr'`, color `#3b82f6`), RBAC (`id: 'rbac'`, color `#1e40af`), Real-Time Validation (`id: 'validation'`, color `#059669`), and Audit Trail (`id: 'audit'`). State is managed via `useState` for the active feature index. Each feature has `num`, `title`, `desc`, `showcaseTitle`, `showcaseDesc`, `tags` (with `type: 'primary' | 'accent' | 'success'`), `eyebrow`, `color`, and `accentColor` fields. The active showcase panel renders a Three.js `Canvas` via `@react-three/fiber` with a `useFrame` animated mesh. A `useRef` and `useEffect` handle scroll-triggered entrance animations. Tag pills use CSS class variants based on `type`.
As a frontend developer, implement the UserRoles section for the DMS page. This section renders four role cards from a static `roles` array: Department Employee (`shape: 'box'`, color `#3b82f6`), Document Manager (`shape: 'octahedron'`, color `#059669`), Finance/Invoice Approver (`shape: 'tetrahedron'`, color `#f59e0b`), and a fourth role. Each card embeds a `Canvas` rendering a `RoleIcon` component that uses `useFrame` to continuously rotate a primary mesh (`rotation.y = t * 0.6`, `rotation.x = sin(t*0.4)*0.2`) alongside a matching wireframe mesh (`opacity: 0.15`). Geometry is selected dynamically: `octahedronGeometry`, `tetrahedronGeometry`, `dodecahedronGeometry`, or `boxGeometry`. Each card also displays `badgeLevel`, `badgeLabel`, `responsibilities` list, and a `permissions` array rendered as permission chips, visually differentiated from `allPerms`.
As a frontend developer, implement the ValidationWorkflow section for the DMS page. This section renders a 4-step pipeline using a static `steps` array: ERP Data Fetch (connector label 'Fetch'), Document Retrieval ('Retrieve'), OCR & AI Extraction ('Extract'), and Validation & Results (no connector). Each step renders a numbered badge, inline SVG icon (database ellipse, document path, monitor rect, and checklist path geometries), title, and description. Between steps, connector elements display the `connectorLabel`. Below the pipeline, four `resultChips` are rendered with CSS modifier classes: `vw-result-chip--green` (Validated), `vw-result-chip--amber` (Partial Match), `vw-result-chip--red` (Failed), `vw-result-chip--blue` (Manual Review). The section root uses `aria-label='Validation Workflow'`. Pure static JSX â no state or canvas.
As a frontend developer, implement the SecurityHighlights section for the DMS page. This section renders four static security badge cards from a `badges` array: JWT Authentication (`key: 'jwt'`), Encrypted Storage (`key: 'encrypted'`), Audit Logging (`key: 'audit'`), and RBAC Enforcement (`key: 'rbac'`). Each badge renders: an icon wrapper (`sh-badge-icon-wrap`) containing an inline SVG (padlock rect, shield path, document path, and user-circle geometries respectively), a title, description, and a `status: 'Active'` indicator. The section header includes an `sh-label` ('Enterprise Security') and an `sh-title` with a highlighted `<span>` wrapping 'Zero-Trust'. Pure static JSX â no state, no canvas.
As a frontend developer, implement the QuickStats section for the DMS page. This section renders four static stat cards from a `stats` array: Core Modules (`key: 'modules'`, number `'4'`, sublabel listing all four modules), Max QR Files (`key: 'files'`, number `'30,000+'`), QR Scan Response (`key: 'response'`, number `'< 5s'`), and RBAC Roles (`key: 'rbac'`, number `'Config'`). Each `qs-stat-card` renders an `qs-icon-wrapper` with an inline SVG (four-rect grid, document path, clock circle, padlock rect), a `qs-number`, `qs-label`, and `qs-sublabel`. The section root uses `aria-label='Quick statistics'`. Pure static JSX â no state or canvas.
As a frontend developer, implement the GetStartedCTA section for the DMS page. This section renders a full-width CTA panel with: a decorative `gsc-overlay` and `gsc-grid-decor` div (both `aria-hidden`), an eyebrow label with `gsc-eyebrow-dot` span, an `h2.gsc-headline`, a `p.gsc-subtext` describing Marketing/Contracting/Purchase automation, and two CTA anchors: `gsc-btn-primary` linking to `/Dashboard` ('Get Started Free' with a chevron SVG) and `gsc-btn-secondary` linking to `/BillValidation` ('Schedule Demo' with a calendar SVG). A `gsc-trust` row renders three trust items â 'JWT Secured' (shield SVG), 'RBAC Enabled' (checkmark SVG), 'No Setup Fee' (clock SVG) â separated by `gsc-trust-divider` spans. Pure static JSX â no state.
As a frontend developer, implement the Footer section for the DMS page. This section renders the `Footer` component with: a decorative `ftr-gradient-line` div, a copyright paragraph with `ftr-brand` span ('calm-document'), a `nav.ftr-links` (aria-label='Footer navigation') mapping the `footerLinks` array â Privacy Policy (`/Privacy`), Terms of Service (`/Terms`), Contact Support (`/Login`) â separated by `ftr-pipe` spans via `React.Fragment`, and a `ftr-socials` div rendering Linkedin, Twitter, and Github icon buttons from `lucide-react` as accessible anchor tags with `target='_blank'` and `rel='noopener noreferrer'`. Note: this Footer component may already exist from BillValidation or ValidationLogs pages (task IDs e67eca1c, f8e3ee8d) â reuse if available.
As a frontend developer, implement the QRTrackingHero section for the QRTracking page (imported from '../styles/QRTrackingHero.css'). Features a 2D animated QRGridBackground canvas component using useEffect with requestAnimationFrame loop: renders a CELL=28 grid where cells animate alpha via sine waves (tick * 0.005 + r * 0.3 + c * 0.17) and probabilistically draw 5x5 QR module patterns (QR_PROB=0.55) using drawQRCell with rgba(59,130,246,alpha). Also includes a 3D QRCube cluster rendered via @react-three/fiber Canvas â each QRCube mesh uses useFrame for sinusoidal x-rotation (speed+phase), y-rotation, and vertical float on position.y. Canvas uses useThree. Both canvas layers are layered for a hero background effect with qth-bg-canvas className.
As a frontend developer, implement the QRGenerationPanel section for the QRTracking page (imported from '../styles/QRGenerationPanel.css'). Features a 3D QRMesh rendered in QRCanvas (@react-three/fiber, camera at [0,0,3.8], fov 42) with a 5x5 binary pattern grid of boxGeometry cells â each cell ref stored in cellsRef array and animated via useFrame: z-position lerps to sinusoidal target when isGenerating=true, emissiveIntensity pulses. Three corner finder squares at positions [-0.62,0.62], [0.62,0.62], [-0.62,-0.62] glow amber on generation. A base plate mesh sits behind. groupRef rotation speeds up during generation (1.5 vs 0.4). Progress prop drives visual state. useState manages isGenerating and progress. useCallback and useRef used for generation control flow.
As a frontend developer, implement the FileRegistrySection for the QRTracking page (imported from '../styles/FileRegistrySection.css'). Renders a searchable, filterable, paginated file registry table using ALL_FILES mock dataset (20+ entries with id, name, department, folder, dateCreated, status fields). Uses lucide-react icons: Search, FileText, QrCode, Download, Eye, Copy, Check, ChevronLeft, ChevronRight, Filter, X. State hooks: useMemo for filtered/paginated results, useCallback for handlers. Supports status filter (available/taken/returned), department filter, and text search. Pagination with ChevronLeft/ChevronRight controls. Each row has Copy (with Check confirmation state), Eye preview, QrCode, and Download action buttons. Filter panel toggled by Filter icon with X dismiss.
As a frontend developer, implement the QRScanSection for the QRTracking page (imported from '../styles/QRScanSection.css'). Three-tab interface: camera, upload, manual. State hooks: activeTab, cameraOn, fileId, dragOver, scanning, result, notFound, selectedStatus, remarks, updating, updateSuccess, updateError â plus fileInputRef. MOCK_FILES lookup keyed by FILE-2024-XXXXXX IDs. performLookup callback uses 1200ms setTimeout to simulate scan, sets result or notFound. Camera tab toggles cameraOn with Camera/CameraOff lucide icons. Upload tab supports drag-and-drop (dragOver state) and fileInputRef click trigger. Manual tab has fileId input with handleKeyDown (Enter key) and handleManualScan. StatusBadge sub-component with qss-status-badge classes (status-available/taken/returned) and qss-status-dot. STATUS_OPTIONS array drives a radio-style status update panel with colorClass variants. Update flow uses updating state with updateSuccess/updateError feedback. Icons: QrCode, Upload, Hash, Search, CheckCircle, AlertCircle, Clock, User, RefreshCw, FileText, ArrowRight, Camera, CameraOff.
As a frontend developer, implement the FileMovementHistory section for the QRTracking page (imported from '../styles/FileMovementHistory.css'). Renders ALL_ENTRIES mock dataset (8 entries: id, user, initials, department, action, timestamp, fileId, folderPath, remarks) as a filterable movement log. Uses lucide-react icons: Download, ChevronDown, Clock, User, Building2, FileText, MessageSquare, Hash, Filter, X. formatTimestamp helper uses toLocaleString('en-IN') for display. getActionClass helper maps Taken/Returned/Moved to CSS variants. State: useMemo for filtered entries, useCallback for filter handlers. Supports department filter (Marketing/Contracting/Purchase) and action filter (Taken/Returned/Moved) with X dismiss chips. Each entry card shows initials avatar, user name, department badge, action badge, timestamp, fileId with Hash icon, folderPath, and remarks with MessageSquare icon. Download button for CSV export.
As a frontend developer, implement the PendingReturnsSection for the QRTracking page (imported from '../styles/PendingReturnsSection.css'). Displays PENDING_FILES (6 entries with id, name, desc, takenBy, initials, avatarColor, department, dateTaken, daysOverdue). Icons: AlertTriangle, Mail, CheckCircle, Clock, FileText, Users from lucide-react. State: threshold (number input, default 7 days), sentMap (object keyed by fileId tracking sent reminders), toastMsg, toastVisible, toastExiting. showToast callback triggers 3s toast with 300ms exit animation via toastExiting flag. handleSendReminder marks fileId in sentMap and shows toast. handleBulkRemind filters PENDING_FILES where daysOverdue > threshold and !sentMap[fileId] and sends bulk reminders. DEPT_CLASS maps Marketing/Contracting/Purchase to CSS classes. formatDate uses toLocaleDateString('en-IN'). Avatar circles use inline avatarColor style. Overdue badge colored by daysOverdue severity.
As a frontend developer, implement the BulkQRDownloadSection for the QRTracking page (imported from '../styles/BulkQRDownloadSection.css'). Manages INITIAL_JOBS state (6 batch jobs: id, department, quantity, date, status, progress). Icons: Download, RefreshCw, Calendar, Package, CheckCircle, AlertCircle, Clock, Search, Plus, ChevronDown, Save, X, Archive. State: jobs array, search string, scheduleOpen boolean, retrying (jobId|null), downloading (jobId|null), toast ({message,type}|null), scheduleForm ({department, quantity, frequency, startDate, prefix}). StatusBadge sub-component with bqd-status CSS classes and bqd-status-dot for completed/in-progress/failed. handleDownload simulates 1400ms download with toast. handleRetry simulates 1600ms retry, updates job status to 'in-progress' with progress:12. scheduleForm controlled inputs with handleScheduleChange. handleSaveSchedule validates form. DEPT_OPTIONS=['Marketing','Contracting','Purchase'], FREQ_OPTIONS=['Daily','Weekly','Monthly','On Demand']. scheduleOpen panel toggled by Plus button, dismissed by X.
As a frontend developer, implement the TrackingStatsSection for the QRTracking page (imported from '../styles/TrackingStatsSection.css'). Renders four stat cards from statsData array (total:24758, active:1847, returned:22543, pending:368) each with variant CSS class (total/active/returned/pending), value, label, sublabel, progressPct, trend direction/text, alertBadge flag, and inline SVG icon. AnimatedNumber sub-component uses useEffect with setTimeout delay (default 400ms) and requestAnimationFrame loop: startTimeRef tracks animation start, elapsed/duration drives cubic ease-out (1 - Math.pow(1-progress, 3)) applied to display state via setDisplay(Math.round(eased * target)). duration defaults to 1400ms. rafRef stores animation frame handle for cleanup. alertBadge rendered on pending card. trend.dir drives up/down arrow styling.
As a frontend developer, implement the Footer section for the QRTracking page (imported from '../styles/Footer.css'). Static footer component with ftr-root, ftr-gradient-line (aria-hidden decorative top border), and ftr-inner layout. Renders copyright text with ftr-brand span ('calm-document'), a nav.ftr-links with three links (Privacy Policyâ/Privacy, Terms of Serviceâ/Terms, Contact Supportâ/Login) separated by ftr-pipe spans, and ftr-socials div with three icon buttons (Linkedin, Twitter, Github from lucide-react) as external links with target='_blank' and rel='noopener noreferrer'. Component likely already exists from BillValidation (e67eca1c), ValidationLogs (f8e3ee8d), or DMS (314c8978) pages â verify reuse before reimplementing.
As a frontend developer, implement the QRScanNavbar section for the QRScan page. This reuses the LoginNavbar component pattern (same CSS import '../styles/LoginNavbar.css') with a 3D LogoCube rendered via @react-three/fiber Canvas using RoundedBox from @react-three/drei. The LogoCube animates with useFrame â rotating on Y axis at 0.4 rad/s and sinusoidal X tilt. The navbar tracks scroll state (setScrolled on window.scrollY > 10), manages mobile menuOpen state with click-outside detection via navRef, and includes a dark/light theme toggle (isDark state via useCallback toggleTheme). Component may already exist from the DMS page â verify before recreating.
As a frontend developer, implement the AdminSidebar section for the UserManagement page. The sidebar renders navGroups â grouped navigation items (Overview, Administration, Modules, Compliance) each with SVG icons, href links, and optional badge counts. The 'User Management' item is marked active:true with badge '24'. Uses useState for collapse/expand state. Imports AdminSidebar.css. Navigation items link to /Dashboard, /UserManagement, /RoleManagement, /DMS, /QRTracking, /AuditLogs. This component may already exist from an admin layout page; check for reuse before rebuilding.
As a frontend developer, implement the UserManagementHeader section for the UserManagement page. The header renders a breadcrumb (Dashboard âē User Management), page title h1, subtitle, and an actions row with an Export button (SVG download icon) and a Create New User anchor styled as umh-btn-create. Below the title block, a filter toolbar exposes: a search input (search state), a sort dropdown (sortBy state, SORT_OPTIONS: name_asc/name_desc/created_desc/created_asc/role), a role filter dropdown (roleFilter state, ROLE_OPTIONS), and a department filter dropdown (deptFilter state, DEPT_OPTIONS). A hasActiveFilters computed flag drives a Clear Filters button. Imports UserManagementHeader.css.
As a frontend developer, implement the UserManagementTabs section for the UserManagement page. Renders a nav[role=tablist] with three tabs â All Users (142), Active Users (118, umt-count-active), Inactive Users (24, umt-count-inactive) â each with an SVG icon, label, and count badge. Uses useState(activeTab) initialized to 'all'; clicking a tab sets activeTab and applies umt-active class. Each button uses role=tab, aria-selected, aria-controls and id attributes for accessibility. Imports UserManagementTabs.css.
As a frontend developer, implement the UserListSection for the UserManagement page. Renders a paginated, sortable data table of ALL_USERS (20+ mock records) using useMemo for filtered/sorted slices. Columns: checkbox select-all, User (avatar initials with uls-avatar-* color classes, name, email), Department, Role (role badge), Status (Active/Inactive/Suspended badges), Last Login, and an Actions column with Pencil (edit) and Trash2 (delete) icons from lucide-react. Column headers use ChevronUp/ChevronDown/ChevronsUpDown sort indicators. Pagination controls with ChevronLeft/ChevronRight and page-of-total display. Empty state uses the Users icon. Imports UserListSection.css.
As a frontend developer, implement the UserActionsPanel section for the UserManagement page. Displays a detail panel for a selected user (MOCK_USER: Priya Ramachandran, Finance, Invoice Validator) showing: avatar with getInitials helper, user meta fields (IconUser, IconMail, IconBuilding, IconShield, IconClock â all inline SVG components), an active/inactive status toggle, a role selector dropdown from ROLES array, and a permissions checklist (7 permissions, each with granted boolean toggle). Action buttons include IconEdit (edit profile) and IconKey (reset password). All icons are custom inline SVG function components. Uses useState for editing mode, role selection, and permission overrides. Imports UserActionsPanel.css.
As a frontend developer, implement the BulkActionsSection for the UserManagement page. Renders a collapsible panel (expanded state, ChevronDown toggle) showing selectedCount (default 3) with a clear-selection handler. Four action cards (BULK_ACTIONS): Assign Role (Shield icon, bas-green), Change Status (ToggleLeft, bas-blue), Reset Password (KeyRound, bas-amber), Export Users (Download, bas-purple) â each disabled when selectedCount===0. Clicking an action opens a modal (activeModal state) for confirmation: role modal shows a ROLES dropdown (selectedRole state), status modal shows STATUSES radio (selectedStatus state with color indicators), password modal shows a warning, export modal previews record count. handleConfirm builds a descriptive toast message via showToast (setTimeout 3200ms clear). Toast renders with CheckCircle or AlertCircle icons, X dismiss. Imports BulkActionsSection.css and lucide-react icons.
As a frontend developer, implement the ActivityLogSection for the UserManagement page. Renders a paginated activity log table (PAGE_SIZE=6) over ALL_ENTRIES (10 mock entries with types: create, edit, delete, login, role, export). Filter buttons (FILTER_OPTIONS: all/create/edit/delete/login/role/export) drive activeFilter state; useMemo filters entries. Each row shows: a colored type badge (BADGE_LABELS map, with als-create/als-edit/als-delete/als-login CSS classes), actor name, action description, target with targetLabel, timestamp, and IP address. Header includes a Download icon button and a Shield icon. Clock icon used in the empty state. Pagination mirrors UserListSection pattern. Imports ActivityLogSection.css and lucide-react (Download, Clock, Shield).
As a frontend developer, implement the LoginNavbar section for the RoleManagement page. This section reuses the LoginNavbar component which may already exist from previous pages. It features a 3D animated LogoCube built with @react-three/fiber and @react-three/drei (RoundedBox with meshStandardMaterial, emissive plane meshes for document lines). The navbar uses useState for scrolled, menuOpen, and isDark states, useRef for navRef and click-outside detection, useEffect for scroll listener and click-outside handler, and useCallback for toggleTheme and toggleMenu. Apply ln-navbar, ln-scrolled, ln-inner, ln-logo-3d-wrapper CSS classes. The Canvas renders the LogoCube with continuous y-axis rotation and sinusoidal x-axis tilt via useFrame. Depends on UserManagement AdminNavBar task (fcec697d-4b88-4b5d-ab14-05d39344d39c) to establish page-level chain.
As a frontend developer, implement the NotificationsFilters section for the Notifications page. This section renders a filter bar with `useState` for `activeTab` (default 'all'), `timeFilter` (default 'today'), and `dropdownOpen` (boolean), plus a `dropdownRef` for click-outside dismissal via `useEffect` and `document.addEventListener('mousedown', ...)`. The `CATEGORY_TABS` array defines 5 tabs (All: 24, Validation: 8, Documents: 7, QR Tracking: 5, System: 4) each with an icon from `lucide-react` (`Bell`, `CheckCircle`, `FileText`, `QrCode`, `Settings`). Tabs render as `role='tab'` buttons with `aria-selected` and `.nf-tab--active` class toggling. A time filter dropdown uses `TIME_OPTIONS` (Today, This Week, This Month, All Time) with a `ChevronDown` icon and `Check` icon marking the active option; dropdown closes on outside click. `onCategoryChange` and `onTimeChange` callback props are invoked on selection. An `isNonDefaultFilter` flag (activeTab !== 'all' || timeFilter !== 'today') can drive a reset affordance.
As a frontend developer, implement the NotificationsList section for the Notifications page. This section renders a list of notifications from `INITIAL_NOTIFICATIONS` using `useState` and `useCallback`. The `TYPE_META` object defines four types â `validation` (blue #1e40af), `documents` (green #059669), `qr` (amber #f59e0b), `system` (red #ef4444) â each with an inline SVG icon and an RGB value for CSS custom property-based theming. Notification items include `id`, `type`, `title`, `description`, `timestamp`, `read` flag, and an `actions` array of CTA buttons with `primary`/`secondary` variants linking to internal routes (e.g., `/BillValidation`, `/ValidationLogs`). Sample entries cover invoice validation completed, partial match requiring review, new DMS document upload, and QR tracking events. Per-item interactions likely include mark-as-read toggling and action button click handlers via `useCallback`. This section is independent of NotificationsFilters.
As a frontend developer, implement the NotificationsEmptyState section for the Notifications page. This section renders a `@react-three/fiber` Canvas containing a `BellMesh` group component composed of: a bell dome (`sphereGeometry` args=[0.52, 32, 32] with half-sphere clip), a bottom rim (`torusGeometry` args=[0.38, 0.055, 16, 48]), a stem (`cylinderGeometry`), an amber clapper (`sphereGeometry` args=[0.09, 16, 16] with emissive #f59e0b), a `THREE.BackSide` glow sphere (`sphereGeometry` args=[0.68] with opacity 0.07), and a green notification ring (`torusGeometry` args=[0.15, 0.028, 12, 30]). `useFrame` animates the group with Z-axis sinusoidal swing (`sin(t * 0.8) * 0.12`), vertical float (`sin(t * 1.1) * 0.05`), ring rotation, and `glowRef` emissive intensity pulsing (`0.35 + sin(t * 2.2) * 0.15`). The section wraps the Canvas in `.nes-card` with `.nes-canvas-wrapper` and includes empty-state copy below. This section is independent of NotificationsList and NotificationsFilters.
As a backend developer, implement the bill validation engine API: POST /api/validation/run (trigger validation for a given invoice ID â fetches ERP data, retrieves document, runs OCR extraction, compares fields, returns result: Validated/Partial Match/Failed/Manual Review Required with per-field comparison details), GET /api/validation/results (paginated list with filters: department, status, date range, vendor, bill_number), GET /api/validation/results/{id} (full validation result with field comparison rows, mismatch details, OCR logs, AI logs), PUT /api/validation/results/{id}/approve (approve manual review with notes), PUT /api/validation/results/{id}/reject, PUT /api/validation/results/{id}/escalate. Implement exact matching, numeric comparison, date normalization, and text validation per SRD Section 5.2.5. Note: ApprovalPanel (6c1226a9), MismatchComparison (4adfaf5b), ValidationLogsTable (5236e615) depend on these endpoints.
As a frontend developer, implement the ValidationDetailsModal section for the BillValidation page. The ValidationDetailsModal component uses a useState hook (activeTab) to switch between three tabs: ERP Data (Database icon), Extracted Data (Scan icon), and Field Comparison (FileText icon). Renders a modal overlay with an invoice header showing status badge ('partial'), department, processedAt, submittedBy fields from INVOICE_DATA. The ERP and Extracted tab panels display side-by-side key-value grids for 12 fields (billNumber, vendorName, partyDetails, billingDate, dueDate, netAmount, gstAmount, totalAmount, invoiceMadeBy, employeeEmail, poNumber, department, currency). The Field Comparison tab renders COMPARISON_ROWS table with ok/mismatch/warning status icons (CheckCircle, AlertTriangle, XCircle), highlighting mismatched rows (gstAmount: âš15,210 vs âš15,990; totalAmount mismatch). Footer includes Download and Send action buttons. X close button dismisses the modal. Import from '../styles/ValidationDetailsModal.css'.
As a frontend developer, implement the ValidationLogsPageHeader section for the ValidationLogs page. The component renders a breadcrumb trail (Dashboard â Bill Validation â Validation Logs) using an ordered list with chevron SVG separators and aria-current='page' on the active crumb. Below the breadcrumb, it displays a meta strip with four metaItems (Access: Finance & Auditor, Retention: 90 Days, Updated: Real-time, Module: Bill Validation) each with inline SVG icons. A useState hook manages showTooltip for a help/info tooltip. The header includes a vlph-accent-bar decorative element and is wrapped in a <header> with role='banner'. Styles import from '../styles/ValidationLogsPageHeader.css'.
As a frontend developer, implement the ValidationLogsFilterBar section for the ValidationLogs page. The component exposes five filter state hooks: department, status, dateFrom, dateTo, and type, plus a mobile-expand toggle. Filter options are defined as static arrays: DEPARTMENTS (4 options), STATUSES (5 options including validated/partial/failed/manual_review), and TYPES (ocr/ai/manual). A getChips() utility derives active filter chips from current state, each rendered with a ChipCloseIcon (X SVG) for individual removal. Custom SVG components include FilterIcon (polygon funnel), ResetIcon (circular arrow), and ChevronIcon (animates rotate(180deg) when open via inline style transition). A reset-all button clears all filters. useCallback is used for handlers. Styles import from '../styles/ValidationLogsFilterBar.css'.
As a frontend developer, implement the ValidationLogsStatsOverview section for the ValidationLogs page. The component renders four stat cards defined in the statCards array: Total Validations (4,821), Passed (3,614 / 74.9%), Failed (743 / 15.4%), and Pending Review (464 / 9.6%), each with a change indicator (up/down/neutral direction), period label, and variant CSS class. Each card includes a Sparkline sub-component that uses a canvas element (canvasRef via useRef) rendered in a useEffect. The Sparkline draws a filled gradient area and a bezier-curve smoothed line using the Canvas 2D API, respecting devicePixelRatio for sharpness. Colors and fill values are passed per card (blue, green, red, amber). Styles import from '../styles/ValidationLogsStatsOverview.css'.
As a frontend developer, implement the ValidationLogsExportSection for the ValidationLogs page. The component imports lucide-react icons (Download, ChevronDown, FileText, FileSpreadsheet, File, Calendar, CheckSquare, LayoutGrid, Building2, Clock, BarChart2, AlertTriangle, BookOpen, Zap, X). State hooks manage: isExpanded (collapsible panel toggle), selectedScope (4 options: selected/filtered/department/date_range with row counts), selectedFormat (csv/excel/pdf), selectedDatePreset (6 presets: today/week/month/last30/quarter/custom), dateFrom/dateTo (default 2026-04-01 to 2026-05-12), selectedPreset (from 6 PRESET_REPORTS cards), isExporting (simulated progress), exportProgress (numeric 0-100), downloadReady, and downloadFile ({name, size}). A handleToggle useCallback controls accordion expand. The PRESET_REPORTS grid includes Weekly Summary, Department Mismatch Report, OCR Accuracy Log, Manual Review Queue, Vendor Validation Summary, and Full Audit Trail â each with badge labels and lucide icon components. Styles import from '../styles/ValidationLogsExportSection.css'.
As a frontend developer, implement the Footer section for the ValidationLogs page. This is a shared Footer component (importing from '../styles/Footer.css') that may already exist from the Login or BillValidation pages â verify before rebuilding. It renders three footerLinks (Privacy Policy â /Privacy, Terms of Service â /Terms, Contact Support â /Login) separated by pipe characters, a copyright line with the 'calm-document' brand span, and three social icon buttons using lucide-react icons (Linkedin, Twitter, Github) each with target='_blank' rel='noopener noreferrer' and aria-label. A ftr-gradient-line decorative div sits at the top of the footer.
As a frontend developer, implement the QRScanHero section for the QRScan page (imports '../styles/QRScanHero.css'). Renders a 3D animated QRCodeMesh via @react-three/fiber Canvas â the mesh is built from an 11-row pixel pattern array producing individual boxGeometry cubes whose emissiveIntensity pulses via useFrame using a per-pixel wave formula (sin(t*1.5 + i*0.3)). The group rotates sinusoidally on Y and X axes. A background plate (boxGeometry) and border frame are rendered behind the pixels. The section displays a 4-step workflow list (steps array: Point Camera, Auto-Validate Access, View File Details, Update & Log Status) and a stats row (stats array: 30K+ Files Tracked, <5s Scan Response, 100% Audit-Ready) below the 3D canvas.
As a frontend developer, implement the ScanInputZone section for the QRScan page (imports '../styles/ScanInputZone.css'). Contains a QRScene Three.js component rendered in a Canvas that accepts an isScanning boolean prop â when scanning, the group rotation speed increases (0.6 vs 0.15), ring spin accelerates (1.2 vs 0.3), and point light intensity jumps to 1.2. The scene includes a torus ring (ringRef with scale pulse), a 3x3 QR grid of boxGeometry meshes, three corner torus markers, and floating particles via bufferGeometry/bufferAttribute with animated opacity. The host component manages isScanning state, useRef for input, and useCallback handlers. Uses useState, useRef, useEffect, useCallback for camera activation, manual ID text input fallback, and scan trigger logic.
As a frontend developer, implement the ScanResult section for the QRScan page (imports '../styles/ScanResult.css'). Defines STATUS_DATA object with three keys â valid, invalid, notfound â each containing label, badgeClass, cardClass, tabActiveClass, msgClass, message, fileId, department, folder, status, scannedBy, and an SVG icon. Renders a StatusSphere Three.js mesh via Canvas that reads statusType prop, maps it to STATUS_COLORS (#059669/#ef4444/#f59e0b), and animates via useFrame with Y rotation at 0.6 rad/s, sinusoidal X at 0.4, and scale pulse at sin(t*1.5)*0.05. The section has tab UI to switch between valid/invalid/notfound states and displays the corresponding file metadata fields from STATUS_DATA.
As a frontend developer, implement the FileDetailsCard section for the QRScan page (imports '../styles/FileDetailsCard.css'). Uses lucide-react icons: FileText, ChevronDown, Copy, Check, Building2, FolderOpen, Clock, User, HardDrive, Tag. Manages two state variables: isOpen (accordion expand/collapse toggle) and copied (clipboard feedback, auto-resets after 2000ms via setTimeout). The card header is keyboard-accessible (role=button, tabIndex=0, onKeyDown for Enter/Space, aria-expanded, aria-controls). Renders a fields array of 6 items (Department, File Size, Folder Path, Current Status, Last Updated, Uploaded By) with fullWidth layout flags and isStatus flag for color-coded status badges via getStatusClass/getValueClass helpers.
As a frontend developer, implement the StatusUpdateForm section for the QRScan page (imports '../styles/StatusUpdateForm.css'). Manages state: selectedStatus, remarks (max 300 chars enforced in handleRemarksChange), errors object, isSubmitting, and submitted. STATUS_OPTIONS array has 4 entries (empty placeholder + available/taken/returned). validate() checks for empty selection and same-as-current status (currentStatus simulated as 'available'). handleSubmit runs validate, sets isSubmitting=true, then resolves via setTimeout(1400ms) simulating async submission. handleCancel resets all fields. nearLimit flag triggers when remarks.length >= 260. Inline SVG edit icon in header. The form uses a formRef and renders error messages conditionally per field.
As a frontend developer, implement the TrackingHistory section for the QRScan page (imports '../styles/TrackingHistory.css'). Renders ALL_HISTORY array of 11+ event objects (EVT-001 through EVT-011+), each with id, date, time, user, initials, avatarClass (th-avatar-blue/green/amber/rose/violet), department, status (Available/Taken/Returned/Review), and remarks. Uses useMemo for filtered/sorted history derived from filter state. Manages filter state for status and department. Each event row renders a colored avatar with initials, timestamp, user/department metadata, status badge, and remarks text. Section supports pagination or load-more behavior for the full event list.
As a frontend developer, implement the ScanFeedback section for the QRScan page (imports '../styles/ScanFeedback.css'). Implements a toast notification system with TOAST_DURATION=5000ms and MAX_VISIBLE=3 cap. TOAST_TEMPLATES object contains 4 types (success/error/info/warning) each with 2 template entries. A module-level toastIdCounter increments for unique IDs. The Toast sub-component uses timerRef, exiting state (triggers 300ms fade-out before onClose), and a dismiss callback. The getIcon helper renders type-specific SVGs (checkmark polyline, circle+line, warning triangle, info circle). The parent component manages a toasts array state and exposes trigger buttons for each type with demo template cycling.
As a frontend developer, implement the ErrorStateSection for the QRScan page (imports '../styles/ErrorStateSection.css'). Defines ERROR_TYPES array with 3 entries (invalid_qr/camera_denied/network_error) each with id, label, icon symbol. ERROR_DATA maps each type to title, subtitle, badge, and a steps array of 4 objects (title+desc). Includes a Three.js Canvas error visualization component rendered via @react-three/fiber with useFrame animation and Suspense boundary. Component manages activeErrorType state to switch between the three error panels. Each panel renders the badge, title, subtitle, and a 4-step resolution guide. Tab/button UI at top switches between error types.
As a frontend developer, implement the QuickActions section for the QRScan page (imports '../styles/QuickActions.css'). Uses lucide-react icons: QrCode, BookOpen, Printer, Download. Defines actions array with 4 entries: New Scan (href /QRScan, qa-btn--primary), View Registry (href /QRTracking, qa-btn--secondary), Print QR Labels (href /QRTracking, qa-btn--outline-green), Download Report (href /AuditLogs, qa-btn--accent). Manages loadingKey state â clicking New Scan sets loadingKey='new-scan', adds qa-btn--loading class and aria-busy, then navigates after 600ms setTimeout. A qa-divider element is injected before index 2. All other buttons navigate immediately via window.location.href.
As a frontend developer, implement the Footer section for the QRScan page (imports '../styles/Footer.css'). Static footer component using lucide-react icons: Linkedin, Twitter, Github. Renders ftr-gradient-line decorative bar, copyright with ftr-brand span ('calm-document'), a footerLinks nav with 3 links (Privacy Policy /Privacy, Terms of Service /Terms, Contact Support /Login) separated by ftr-pipe spans, and a socials row with 3 external links (LinkedIn, Twitter, GitHub) opening target='_blank' with rel='noopener noreferrer'. Component may already exist from DMS and QRTracking pages â verify and reuse if available.
As a frontend developer, implement the RoleManagementHeader section for the RoleManagement page. This is a static header using rmh-root, rmh-inner, rmh-breadcrumb CSS classes. It renders a three-level breadcrumb (Dashboard â User Management â Role Management) with chevron SVG separators and aria-label. The main header row (rmh-header-row) contains a left title block (rmh-title-block) with an SVG role icon (rmh-icon-wrap), an h1 with class rmh-title, a description paragraph, and three stat pills (rmh-stat-pill) showing '4 Active Roles' (dot-blue), '12 Permissions Configured' (dot-green), and '3 Departments' (dot-amber). The right side (rmh-actions) includes Export and Create Role buttons with SVG icons and aria-labels. No state is required.
As a frontend developer, implement the RoleManagementTabs section for the RoleManagement page. Uses useState with activeTab defaulting to 'roles'. Defines a TABS array of 3 objects (roles, permissions, folder-access) each with id, label, count, and an inline SVG icon. Renders a desktop tab list (rmt-tab-list) as a ul with role='tablist' â each li contains a button with role='tab', aria-selected, aria-controls, and rmt-active class when selected. Also renders a mobile dropdown (rmt-mobile-select-wrapper) with a select element that calls handleSelectChange to sync activeTab. Each option shows label and count. Uses rmt-root, rmt-inner, rmt-tab-btn, rmt-tab-icon, rmt-tab-label, rmt-tab-count CSS classes.
As a frontend developer, implement the RoleManagementSidebar section for the RoleManagement page. Uses useState for selectedRole (defaulting to 'admin') and a search query string. Renders a static roles array of 8 role objects (Administrator, Manager, Bill Validator, DMS User, Auditor, QR Operations, Viewer, Marketing Dept.) each with id, name, type (System/Built-in/Custom), typeColor, typeBg, iconBg, iconColor, userCount, and permCount. Includes sub-components RoleIcon (SVG users icon stroked in role color), UsersIcon, ShieldIcon, and SearchIcon. The sidebar features a search input filtering roles by name, a scrollable role list where each card shows the RoleIcon in a colored icon box, role name, type badge (with dynamic color/bg from role object), userCount, and permCount. The selected card applies an active highlight class. CSS classes: rms-root, rms-search-bar, rms-role-card, rms-role-card-active, rms-type-badge, rms-stat-chip.
As a frontend developer, implement the RoleManagementAudit section for the RoleManagement page. Uses useState and useMemo. AUDIT_DATA is a static array of 10 audit log entries (aud-001 through aud-010) each with id, date, time, user, userInitials, avatarClass (rma-avatar-a through rma-avatar-d for Arjun Mehta, Priya Sharma, Rohan Das, Sneha Nair), action (Created/Modified/Deleted), roleName, and details string. Actions: Created (aud-001 DMS Manager, aud-005 QR Operator, aud-008 Dept Auditor), Modified (aud-002 Validator, aud-003 Admin, aud-006 Viewer, aud-007 Manager, aud-009 Admin), Deleted (aud-004 Temp Reviewer, aud-010 Legacy Finance). Renders a filterable/searchable audit log table with colored action badges (Created=green, Modified=amber, Deleted=red), user avatar initials with rma-avatar-* color classes, date/time display, role name, and expandable details. Uses useMemo for filtering by action type and search. CSS classes: rma-root, rma-table, rma-action-badge-created, rma-action-badge-modified, rma-action-badge-deleted, rma-avatar-a/b/c/d, rma-details-row.
As a frontend developer, implement the Footer section for the RoleManagement page. This reuses the Footer component which may already exist from previous pages (QRTracking, QRScan). It is a static footer using lucide-react icons (Linkedin, Twitter, Github). Renders ftr-root with a decorative ftr-gradient-line div, an ftr-inner containing: a copyright paragraph with ftr-brand span for 'calm-document', a nav (ftr-links) rendering footerLinks array [{Privacy Policy, /Privacy}, {Terms of Service, /Terms}, {Contact Support, /Login}] with ftr-pipe separators, and an ftr-socials div rendering socialLinks array [{Linkedin, https://linkedin.com}, {Twitter, https://twitter.com}, {GitHub, https://github.com}] as anchor tags (ftr-social-btn) with target='_blank' and rel='noopener noreferrer'. No state required.
As a frontend developer, implement the LoginNavbar section for AuditLogs. This section renders a responsive navigation bar using a React Three Fiber Canvas with an animated LogoCube component (RoundedBox from @react-three/drei with meshStandardMaterial, rotation driven by useFrame clock). State includes: scrolled (window.scrollY > 10 via scroll event listener), menuOpen (toggled via toggleMenu callback with clickOutside handler using navRef), and isDark (theme toggle via toggleTheme callback). The navbar applies the 'ln-scrolled' CSS class when scrolled. Note: this component likely already exists from Login/RoleManagement pages â reuse if available, confirming it renders correctly in the AuditLogs page context. Must chain page-level dependency from Dashboard page.
As a backend developer, implement the email notification service for validation mismatch alerts: POST /api/notifications/send (send email to invoice creator's employee_email and departmental email with: invoice reference, department, validation result, mismatch summary, timestamp), GET /api/notifications (paginated list of notification events with filters: type, date, read status), PUT /api/notifications/{id}/read (mark as read), PUT /api/notifications/read-all. Use SMTP email service as per SRD tech stack. Notification types: validation (blue), documents (green), qr (amber), system (red). Trigger automatically after validation run completes with mismatch. Note: NotificationsList (73b5775b), NotificationsHeader (bf699635) frontend tasks depend on this service.
As a backend developer, implement dashboard aggregation API endpoints: GET /api/dashboard/validation-stats (total invoices, validated, partial, failed, manual_review counts with trend data for line chart, filtered by date range and module), GET /api/dashboard/dms-stats (total_documents, recent_uploads, storage_used_gb, active_users, folder_summaries array, recent_uploads_list), GET /api/dashboard/qr-stats (qr_mapped, available, taken, pending_return counts with timeline feed of recent scan events), GET /api/dashboard/department-analytics (per-department validation rates, upload trends for 30-day SVG area chart, QR return donut data), GET /api/dashboard/welcome (user greeting data: name, role, quickStats for review_required, invoices_validated, files_pending_return). Accept query params: date_from, date_to, module filter. Note: ValidationDashboard (1f817961), DMSDashboard (85c7979c), QRDashboard (b8d1f093), DepartmentAnalytics (031d3686), DashboardWelcomeBanner (9a4f7923) all consume these aggregated endpoints.
As a frontend developer, implement the ValidationLogsTable section for the ValidationLogs page. The component renders a data table from LOG_DATA (10+ entries with fields: id, timestamp, invoiceId, billNumber, department, vendor, status, ocrConfidence, mismatch, fullMismatch, processedBy, extractionTime, invoiceAmount, taxAmount). State hooks manage: selectedRows (Set for checkbox multi-select), sortCol/sortDir for column sorting, expandedRow for inline mismatch expansion, and hoveredRow. Columns include a select-all checkbox, log ID, timestamp, invoice/bill refs, department badge, vendor, status pill (validated/partial/failed/manual with color coding), OCR confidence bar, mismatch summary with expand toggle, and a detail action button. useRef and useCallback are used for performance. Styles import from '../styles/ValidationLogsTable.css'.
As a frontend developer, implement the RoleManagementContent section for the RoleManagement page. Uses useState and useCallback. Manages INITIAL_ROLE object (id ROLE-0042 'Document Manager') with fields: name, description, type, department, status (boolean toggle), createdDate, createdBy, modifiedDate, modifiedBy. Provides ROLE_TYPES array (System, Administrative, Operational, Auditor, Viewer, Custom) and DEPARTMENTS array (All Departments, Marketing, Contracting, Purchase, Finance, IT, HR). Renders sub-icon components: IconEdit, IconCopy, IconTrash, IconShield, IconCalendar, IconUser, IconHash (all SVG). The content panel displays role metadata fields as editable inputs/selects bound to state, a status toggle switch, an action toolbar with Edit/Copy/Delete buttons using the icon components, creation/modification audit metadata rows with IconCalendar and IconUser, and a role ID display with IconHash. Uses rmc-root, rmc-toolbar, rmc-field-group, rmc-status-toggle, rmc-meta-row CSS classes.
As a frontend developer, implement the AuditLogsHeader section for AuditLogs. This section renders a page header with alh-grid-overlay and alh-accent-bar decorative elements. State includes: refreshing (boolean, prevents double-trigger) and lastSync (string, updated via setTimeout to current IST time using toLocaleTimeString with timeZoneName). handleRefresh callback sets refreshing=true, waits 1200ms, updates lastSync, then resets. The header includes a breadcrumb nav (Dashboard â Audit Logs), an h1 with alh-title-highlight span, a subtitle describing Bill Validation/DMS/QR Tracking coverage, and three status badges (alh-badge-compliance 'Compliance Ready', alh-badge-secure 'RBAC Enforced', alh-badge-realtime) each with animated alh-badge-dot indicators. An SVG document icon with file/line paths is included in alh-icon-wrap.
As a frontend developer, implement the AuditLogsFilters section for AuditLogs. This section provides multi-field filtering UI with static constant arrays: LOG_TYPES (6 options: all/validation/dms/qr/user_management/system), DEPARTMENTS (4 options: all/marketing/contracting/purchase), ACTIONS (7 options: all/create/edit/delete/view/upload/download). State: INITIAL_FILTERS object with fields logType, department, dateFrom, dateTo, userName, action. Includes active filter badge rendering using BADGE_LABELS and FILTER_DISPLAY_MAPS lookup objects. Custom SVG icon components: XIcon (remove badge), FilterIcon (polygon), SearchIcon (circle+line), ChevronDownIcon (polyline), TrashIcon (polyline+paths). Supports active filter chip display with per-chip remove and full clear-all via TrashIcon. Uses useRef for dropdown focus management and useEffect for outside-click detection.
As a frontend developer, implement the AuditLogsStats section for AuditLogs. This is a stateless display section rendering 4 stat cards from the stats array: Total Logs (24,819, neutral trend 'All time records'), Logs Today (342, down trend '-8% vs yesterday'), Failed Actions (57, up trend '+12% vs yesterday', alert badge), Pending Reviews (18, neutral trend 'Requires attention', review badge). Each stat card has: modifier CSS class (total/today/failed/pending), an inline SVG icon (document/calendar/alert-circle/clock), trend direction rendered via TrendIcon component (up polyline, down polyline, neutral line), and optional badge with type (failed=Alert, pending=Review). TrendIcon is a pure functional component switching on direction prop. Section uses als-root class with aria-label 'Audit Logs Stats'.
As a frontend developer, implement the Footer section for AuditLogs. This is a stateless functional component importing Linkedin, Twitter, Github from lucide-react. Renders ftr-root footer with: ftr-gradient-line decorative div (aria-hidden), ftr-copyright with ftr-brand span ('calm-document'), ftr-links nav (aria-label 'Footer navigation') iterating footerLinks array [Privacy Policy â /Privacy, Terms of Service â /Terms, Contact Support â /Login] with ftr-pipe separators via React.Fragment, and ftr-socials div iterating socialLinks array [Linkedin/Twitter/Github] as external anchor tags (target='_blank', rel='noopener noreferrer'). Note: this component likely already exists from QRScan/RoleManagement pages â reuse if available.
As a frontend developer, implement the ValidationLogsPagination section for the ValidationLogs page. The component manages currentPage and rowsPerPage state (options: 10/25/50/100, default 25) against TOTAL_RECORDS=127. A getPageCount() utility computes total pages; getVisiblePages() implements a smart ellipsis algorithm â showing up to 7 page buttons with 'ellipsis-start'/'ellipsis-end' string tokens for mid-range navigation. The UI includes a rows-per-page <select>, a record summary showing startRecordâendRecord of TOTAL_RECORDS with highlighted spans, and prev/next ChevronLeft/ChevronRight SVG buttons. Clicking an ellipsis token is a no-op; clicking a number sets currentPage. Changing rows resets to page 1. Roles and aria-labels applied. Styles import from '../styles/ValidationLogsPagination.css'.
As a frontend developer, implement the ValidationLogsDetailModal section for the ValidationLogs page. The modal displays detailed validation info for a selected log entry using LOG_DATA (invoiceRef, vendor, department, status). It contains three tabbed panels navigated via useState activeTab: (1) Field Comparison â a FIELD_COMPARISON table (10 rows: Invoice Number, Vendor, Date, Amount, Tax GST 18%, Total, PO Reference, Bank Account, Due Date, GSTIN) with ok/fail/warn status icons; (2) Confidence Scores â CONFIDENCE_FIELDS (8 fields) rendered as labeled progress bars with high/medium/low level classes; (3) Processing Logs â two sub-sections OCR_LOGS and AI_LOGS rendered as timestamped terminal-style log lines with info/ok/warn/error level color coding. A close button and overlay backdrop dismiss the modal. Styles import from '../styles/ValidationLogsDetailModal.css'.
As a frontend developer, implement the RoleManagementPermissions section for the RoleManagement page. Uses useState and useMemo. Defines MODULES array of 3 module groups: 'Bill Validation' (8 permissions: bv-view, bv-upload, bv-validate, bv-edit, bv-download, bv-delete, bv-logs, bv-notify), 'Document Management System (DMS)' (7 permissions: dms-view, dms-upload, dms-edit, dms-download, dms-delete, dms-manage-folders, dms-search), and 'QR Tracking' (with qr-view, qr-generate, qr-scan, qr-update-status, qr-history, qr-download). Each module has id, label, dotClass, and a permissions array with id, name, desc. Uses useMemo to compute enabled permission counts per module. Renders collapsible module sections with rmp-module-dot-billval/dms/qr colored indicators, individual permission rows with checkbox toggles, permission name, and description tooltip. Includes a 'Select All' / 'Deselect All' per module. CSS classes: rmp-root, rmp-module-header, rmp-module-dot-billval, rmp-perm-row, rmp-perm-checkbox, rmp-perm-desc.
As a frontend developer, implement the RoleManagementFolderAccess section for the RoleManagement page. Uses useState and useCallback. Imports lucide-react icons: Folder, FolderOpen, ChevronRight, ChevronDown, Shield, Save, RotateCcw, CheckSquare, XSquare, Eye, Info. PERM_COLS is ['view','upload','edit','delete']. INITIAL_FOLDERS is an array of 4 top-level folder objects (marketing, contracting, purchase, shared) each with id, name, path, expanded boolean, inherit boolean, perms object {view, upload, edit, delete}, and children arrays with sub-folders (e.g. marketing-campaigns, marketing-assets, marketing-reports; contracting-active, contracting-archive; purchase-invoices, purchase-vendors, purchase-po). Children also have inherit and perms. Renders a tree-view with expand/collapse toggles (ChevronRight/ChevronDown), Folder/FolderOpen icons, per-row permission checkboxes for each PERM_COL, an inherit-parent toggle, and Save/Reset (RotateCcw) action buttons. CheckSquare/XSquare used for bulk select. Eye and Info used for preview/tooltip. CSS classes: rmfa-root, rmfa-tree-row, rmfa-tree-children, rmfa-perm-cell, rmfa-inherit-badge, rmfa-actions-bar.
As a frontend developer, implement the AuditLogsTable section for AuditLogs. This is the most complex section â a rich data table with AVATAR_COLORS array (6 color pairs with rgba bg and hex color) and a static auditLogs dataset of 5+ entries each containing: id, timestamp, date, time, user, initials, avatarIdx, department, logType, action, entity, entityId, status (Success/Failed), ip, session, details, mismatch, duration, userAgent. State includes column sorting (useMemo for sorted rows), expandable row detail panels (mismatch details rendering), and status badge color mapping. Renders avatar circles using AVATAR_COLORS[avatarIdx], log type badges (validation/document/qr), action labels, and status chips. Uses useState for selected rows and expanded row state, useMemo for derived sorted/filtered data. Includes a detail drawer or inline expand for the 'details' and 'mismatch' fields.
As a frontend developer, implement the AuditLogsPagination section for AuditLogs. State: perPage (default 50), currentPage (default 1), inputVal (string, mirrors currentPage), jumped (boolean, triggers CSS flash animation for 450ms on page jump). TOTAL_RECORDS constant = 2847. RESULTS_PER_PAGE_OPTIONS array: [25, 50, 100, 250]. getPills() function generates smart page pill arrays with ellipsis ('...') for large page counts using three branches: current ⤠4, current âĨ total-3, or middle. Callbacks: goToPage (clamps to [1, totalPages]), handlePrev/handleNext, handlePerPageChange (recalculates totalPages and clamps currentPage), handleInputChange, handleInputCommit (parses integer, calls goToPage, triggers jumped flash). ChevronLeft/ChevronRight SVG components for prev/next buttons. Renders startRecord/endRecord calculated display.
As a frontend developer, implement the AuditLogsExport section for AuditLogs. State: modalOpen, showColumns, activeColumns (Set, default: timestamp/user/action/module/status â minimum 1 column enforced), emailAddress, toast (3000ms auto-dismiss via setTimeout), modalFormat ('csv'), modalDelivery ('download'), modalGrouping ('none'), dateFrom ('2026-04-01'), dateTo ('2026-05-12'). Constants: COLUMNS (8 items: timestamp/user/action/module/resource/status/ip/dept), FORMATS (csv/excel/pdf with emoji icons), GROUPING_OPTIONS (5 values: none/user/module/dept/date), DELIVERY_METHODS (download/email with inline SVG icons). Callbacks: handleQuickExport (shows toast with format name), handleSendEmail (validates emailAddress, shows toast, clears input), toggleColumn (adds/removes from Set, enforces minimum 1). Modal panel with format selector, delivery method toggle, grouping dropdown, date range inputs, column checkboxes, and email delivery input. Toast notification overlay.

Sign in to access your document management, bill validation, and QR tracking portal
Centralized platform for invoice verification, secure file storage with role-based access, and real-time physical file tracking across departments.
Access document management, bill validation & QR tracking
Don't have an account?Create account
No comments yet. Be the first!