Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
add_salary_currency_pay_period;application.salary_currency,application.pay_period; Pydantic validators and salary/currency/period rules on create/update;_normalize_salary_fieldsin application service;docs/backend.mdupdated (wire format, schemas, service).compensation-display.ts(formatCompensation, curated currencies, pay periods);ApplicationFormcompensation fields + validation;ApplicationDetailDialogand optional salary column useformatCompensation;api.generated.tsfields for new API properties; Vitest updates +compensation-display.test.ts; widerDialogContentandSelectTriggerw-fullon form.Notes