Skip to content

feat(applications): compensation currency & pay period, table column order, and docs (#10)#19

Merged
leobrqz merged 1 commit intomainfrom
feat/richer-salary-model
Mar 22, 2026
Merged

feat(applications): compensation currency & pay period, table column order, and docs (#10)#19
leobrqz merged 1 commit intomainfrom
feat/richer-salary-model

Conversation

@leobrqz
Copy link
Copy Markdown
Owner

@leobrqz leobrqz commented Mar 22, 2026

Summary

Adds structured compensation on applications (amount + ISO 4217 currency + annual/monthly/hourly pay period) with API validation and coherent clearing when salary is removed. Improves the New/Edit Application dialog layout (wider modal, full-width selects, company separated from compensation). Reorders applications table columns to Job title → Platform → Company → optional columns → Stage → Status → Date applied.

Changes

  • Backend: Alembic migration add_salary_currency_pay_period; application.salary_currency, application.pay_period; Pydantic validators and salary/currency/period rules on create/update; _normalize_salary_fields in application service; docs/backend.md updated (wire format, schemas, service).
  • Frontend: compensation-display.ts (formatCompensation, curated currencies, pay periods); ApplicationForm compensation fields + validation; ApplicationDetailDialog and optional salary column use formatCompensation; api.generated.ts fields for new API properties; Vitest updates + compensation-display.test.ts; wider DialogContent and SelectTrigger w-full on form.
  • Applications table: Column order: Job title, Platform, Company, then optional Seniority / Salary / Resume, then Stage, Status, Date applied, optional Created, Actions.

Notes

Add support for storing and displaying salary currency and pay period.

Backend:
- Add Alembic migration to add salary_currency and pay_period columns to application.
- Add mapped columns to Application model.
- Extend Pydantic schemas (create/update/response) to include salary_currency and pay_period, with validation: normalize 3-letter ISO currency codes and require currency+pay_period when salary is set (clears them when salary is null).
- Add service helper to normalize/clear salary-related fields on create/update.

Frontend:
- Add lib/compensation-display utility to format compensation strings, curated currency list, and helpers for pay periods.
- Update ApplicationForm to capture currency and pay period (UI, validation, layout improvements) and include them in create/update payloads.
- Update ApplicationDetailDialog and ApplicationTable to display formatted compensation using the new utility.
- Update applications table preferences text to reference compensation (amount, currency, pay period).
- Update generated API types and add unit tests (including a new compensation-display test) and adjust existing tests to include the new fields.

Overall this change ensures salary entries are stored with currency and cadence, validated on input, normalized on the backend, and displayed consistently in the UI.
@leobrqz leobrqz self-assigned this Mar 22, 2026
@leobrqz leobrqz added the feature New feature label Mar 22, 2026
@leobrqz leobrqz merged commit c3ca632 into main Mar 22, 2026
5 checks passed
@leobrqz leobrqz deleted the feat/richer-salary-model branch March 25, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(applications): richer salary model with currency, period, equity, and range

1 participant