How iqbalussain/payrollsheet works
Payroll Companion is a role-gated workforce payroll application. Admin and HR users sign in, then work with employee records, daily timesheets, payroll batches and lines, advances, history, salary slips, cost allocation, attendance reports, and audit history. Payroll calculations and carry-forward logic sit in a shared domain layer; React Query data hooks connect the interface to Supabase. The route imports and renders the principal screens, while the shared data module accesses the database. Some subsystem implementation details are unsampled, so those relationships are omitted or marked unverified.
Main entry points: index.tsx Payroll Portal · payroll-data.ts Payroll Data Hooks · PayrollTab.tsx Payroll Batches · external-client.ts Supabase Client
Components 19
Application Shell
- Payroll Portal
src/routes/index.tsx - Sign-in
src/components/payroll/LoginPage.tsx
Workforce & Attendance
- Employee Records
src/components/payroll/EmployeesTab.tsx - Employee Details
src/components/payroll/EmployeeModal.tsx - Daily Timesheets
src/components/payroll/TimesheetsTab.tsx - Attendance Reports
src/components/payroll/AttendanceReportTab.tsx
Payroll Operations
- Payroll Batches
src/components/payroll/PayrollTab.tsx - Advance Management
src/components/payroll/AdvancesTab.tsx - Payroll Calculations
src/lib/payroll.ts
History & Reporting
- Employee History
src/components/payroll/HistoryTab.tsx - Salary Slips
src/components/payroll/SlipsTab.tsx - PDF Generation
src/lib/slip-pdf.ts - Cost Allocation
src/components/payroll/CostTab.tsx - Cost Details
src/components/payroll/CostDetailsModal.tsx - Audit History
src/components/payroll/AuditHistoryTab.tsx
Data & Services
- Payroll Data Hooks
src/lib/payroll-data.ts - Supabase Client
src/integrations/supabase/external-client.ts
Other components
- Admin / HR
- Supabase
Connections 29
- Admin / HR → Payroll Portal: opens
src/routes/index.tsx - Payroll Portal → Sign-in: prompts sign-in
src/routes/index.tsx - Payroll Portal → Employee Records: renders
src/routes/index.tsx - Payroll Portal → Payroll Batches: renders
src/routes/index.tsx - Payroll Portal → Employee History: renders
src/routes/index.tsx - Payroll Portal → Salary Slips: renders
src/routes/index.tsx - Payroll Portal → Cost Allocation: renders
src/routes/index.tsx - Payroll Portal → Advance Management: renders
src/routes/index.tsx - Payroll Portal → Audit History: renders
src/routes/index.tsx - Payroll Portal → Daily Timesheets: renders
src/routes/index.tsx - Payroll Portal → Attendance Reports: renders
src/routes/index.tsx - Payroll Portal → Payroll Data Hooks: loads data
src/routes/index.tsx - Employee Records → Employee Details: opens details
- Payroll Batches → Daily Timesheets: generates draft
README.md - Employee Records → Payroll Data Hooks: reads and saves
- Payroll Batches → Payroll Data Hooks: saves batches
src/components/payroll/PayrollTab.tsx - Advance Management → Payroll Data Hooks: manages advances
- Payroll Data Hooks → Supabase Client: queries
src/lib/payroll-data.ts - Supabase Client → Supabase: connects
- Sign-in → Supabase Client: authenticates
src/components/payroll/LoginPage.tsx - Payroll Batches → Payroll Calculations: uses calculations
src/components/payroll/PayrollTab.tsx - Employee History → Payroll Calculations: uses calculations
src/components/payroll/HistoryTab.tsx - Salary Slips → PDF Generation: generates PDFs
src/components/payroll/SlipsTab.tsx - PDF Generation → Payroll Calculations: formats payroll values
src/lib/slip-pdf.ts - Cost Allocation → Cost Details: opens details
src/components/payroll/CostTab.tsx - Attendance Reports → Payroll Data Hooks: reads attendance data
src/components/payroll/AttendanceReportTab.tsx - Daily Timesheets → Payroll Data Hooks: reads and saves
src/components/payroll/TimesheetsTab.tsx - Employee History → Payroll Data Hooks: reads records
- Audit History → Supabase Client: reads audit records
src/components/payroll/AuditHistoryTab.tsx