Skip to content

PM-4669 payment cycles#20

Merged
vas3a merged 5 commits into
developfrom
PM-4669_payment-cycles
May 21, 2026
Merged

PM-4669 payment cycles#20
vas3a merged 5 commits into
developfrom
PM-4669_payment-cycles

Conversation

@vas3a

@vas3a vas3a commented May 19, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces support for payment cycles and standard hours per day in engagement assignments.

  • Added new fields paymentCycle and standardHoursPerDay to the EngagementAssignment model in the Prisma client, allowing assignments to specify how often payments occur and the standard number of hours per day.
  • Introduced a new PaymentCycle enum with values WEEKLY, FORTNIGHTLY, and MONTHLY, and updated the Prisma schema and client exports to support this.
  • Updated the Prisma schema's inline representation and runtime data model to include the new fields and enum, ensuring consistency across generated client code.

@vas3a vas3a requested review from Copilot, jmgasper and kkartunov May 19, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for assignment payment cadence and daily standard hours, updating service logic, DTOs, Prisma schema/migrations, and generated Prisma client artifacts.

Changes:

  • Introduced PaymentCycle enum and added paymentCycle + standardHoursPerDay to engagement assignments (schema, migration, generated client).
  • Updated engagement/application services and DTOs to accept/emit the new fields and compute weekly agreement rates from daily hours.
  • Updated email payloads and unit tests to reflect the new fields.

Reviewed changes

Copilot reviewed 21 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/integrations/assignment-offer-email.service.ts Adds paymentCycle/standardHoursPerDay to email payload and derives weekly hours from daily hours.
src/integrations/assignment-offer-email.service.spec.ts Updates email service tests for paymentCycle and standardHoursPerDay.
src/engagements/engagements.service.ts Persists/returns new assignment fields and recalculates agreement rate using daily hours.
src/engagements/engagements.service.spec.ts Updates engagement service tests for daily-hours inputs and agreement-rate calculation.
src/engagements/dto/create-engagement.dto.ts Adds request DTO fields/validation/docs for paymentCycle and standardHoursPerDay.
src/engagements/dto/create-engagement.dto.spec.ts Adds DTO validation tests for paymentCycle and decimal precision on standardHoursPerDay.
src/engagements/dto/assignment-response.dto.ts Adds response DTO fields for paymentCycle and standardHoursPerDay.
src/engagements/dto/assignment-context-response.dto.ts Adds context response DTO fields for paymentCycle and standardHoursPerDay.
src/applications/dto/approve-application.dto.ts Adds approval DTO fields/validation/docs for paymentCycle and standardHoursPerDay.
src/applications/applications.service.ts Normalizes/persists new assignment fields and updates agreement rate calculation for daily hours.
src/applications/applications.service.spec.ts Updates tests for daily-hours agreement rate and adds coverage for updating paymentCycle.
prisma/schema.prisma Adds PaymentCycle enum and new assignment fields with defaults + deprecates weekly-hours field.
prisma/migrations/20260518143000_add_payment_cycle_and_standard_hours_per_day/migration.sql Creates enum type, new columns, and backfills standardHoursPerDay from legacy weekly field.
packages/engagements-prisma-client/wasm.js Removes generated WASM client artifact.
packages/engagements-prisma-client/wasm.d.ts Removes generated WASM typings entrypoint.
packages/engagements-prisma-client/runtime/library.d.ts Removes generated runtime typings file.
packages/engagements-prisma-client/query_engine_bg.js Removes generated WASM query engine JS glue.
packages/engagements-prisma-client/schema.prisma Mirrors schema changes in packaged prisma schema.
packages/engagements-prisma-client/package.json Updates generated client package name hash.
packages/engagements-prisma-client/index.js Updates generated client exports/runtime model for new enum/fields.
packages/engagements-prisma-client/index.d.ts Updates generated client typings for new enum/fields.
packages/engagements-prisma-client/index-browser.js Updates browser bundle exports for new enum/fields.
packages/engagements-prisma-client/edge.js Updates edge bundle exports/runtime model for new enum/fields.
.circleci/config.yml Updates workflow branch filters to include feature branch.
Comments suppressed due to low confidence (1)

src/integrations/assignment-offer-email.service.ts:1

  • The conversion factor * 5 (workdays per week) is a business rule that’s now duplicated (also in services calculating agreement rates). Consider centralizing it (e.g., a shared constant like WORK_DAYS_PER_WEEK) to avoid future drift if the rule changes or becomes configurable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/engagements/engagements.service.ts
Comment thread src/engagements/engagements.service.ts
Comment thread src/engagements/engagements.service.spec.ts
@vas3a vas3a merged commit 050bb7c into develop May 21, 2026
4 checks passed
@vas3a vas3a deleted the PM-4669_payment-cycles branch May 21, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants