Skip to content

Feat/generate pdf payslip api#490

Merged
codeZe-us merged 1 commit into
SafeVault:devfrom
shogun444:feat/Generate-PDF-payslipAPI
May 29, 2026
Merged

Feat/generate pdf payslip api#490
codeZe-us merged 1 commit into
SafeVault:devfrom
shogun444:feat/Generate-PDF-payslipAPI

Conversation

@shogun444
Copy link
Copy Markdown
Contributor

Pull Request

Summary

Implemented a secure PDF payslip generation API with downloadable PDF responses for payroll records.

Fixes #482

Approach

runId maps to the paid invoice record used as the payroll execution source. Queries are organization-scoped to prevent cross-organization access. PDF generation is handled server-side using jsPDF with runtime = "nodejs" for compatibility. No payroll tax or deduction logic was invented since those fields do not exist in the current schema.

Type of Change

  • Feature

Key Changes

  • Added /api/v1/payroll/[runId]/payslip/[employeeId] API route
  • Implemented secure organization-scoped payroll lookup
  • Added server-side PDF generation using jsPDF
  • Returned downloadable PDF attachment responses
  • Updated drizzle.config.ts (driver: "pg"dialect: "postgresql")

Screenshots / Recordings

payslip-test-1779963643101-mohammad-crist.pdf

  • Added screenshots of generated payslip PDFs
Screenshot 2026-05-28 155627

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@shogun444 is attempting to deploy a commit to the vestroll's projects Team on Vercel.

A member of the Team first needs to authorize it.

@shogun444 shogun444 force-pushed the feat/Generate-PDF-payslipAPI branch from 6b319a9 to 23a38f7 Compare May 28, 2026 10:41
@github-actions github-actions Bot added size/l and removed size/xl labels May 28, 2026
@codeZe-us codeZe-us self-requested a review May 29, 2026 10:56
@codeZe-us codeZe-us merged commit 5bc9a85 into SafeVault:dev May 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants