Skip to content

Commit

Permalink
refactor(compensations): consistent field naming (salaries → salaries…
Browse files Browse the repository at this point in the history
…ByLocation) (#630)
  • Loading branch information
mathiazom authored Sep 13, 2024
1 parent ef6932d commit cac1ea9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/compensations/Compensations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const Compensations = ({ compensations, locations }: CompensationsProps) => {
salariesFromLocation(
currentYear,
selectedLocation,
compensations.salaries,
compensations.salariesByLocation,
),
[currentYear, selectedLocation, compensations.salaries],
[currentYear, selectedLocation, compensations.salariesByLocation],
);

const updateSelectedDegree = (newDegree: Degree) => {
Expand Down
2 changes: 1 addition & 1 deletion studio/lib/payloads/compensations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ export interface CompensationsPage {
pensionPercent?: number;
benefitsByLocation: BenefitsByLocation[];
bonusesByLocation: BonusesByLocationPage[];
salaries: SalariesByLocation[];
salariesByLocation: SalariesByLocation[];
showSalaryCalculator: boolean;
}
4 changes: 2 additions & 2 deletions studio/schemas/documents/compensations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { titleSlug } from "../schemaTypes/slug";
import seo from "../objects/seo";
import { title } from "../fields/text";
import { bonusesByLocation } from "../objects/compensations/bonusesByLocation";
import { pension } from "../objects/compensations/pension";
import { pensionPercent } from "../objects/compensations/pension";
import { benefitsByLocation } from "../objects/compensations/benefitsByLocation";
import { salariesByLocation } from "../objects/compensations/salariesByLocation";

Expand All @@ -29,7 +29,7 @@ const compensations = defineType({
type: "boolean",
initialValue: true,
}),
pension,
pensionPercent,
bonusesByLocation,
benefitsByLocation,
salariesByLocation,
Expand Down
2 changes: 1 addition & 1 deletion studio/schemas/objects/compensations/pension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineField } from "sanity";

export const pension = defineField({
export const pensionPercent = defineField({
name: "pensionPercent",
title: "Pension Percentage",
type: "number",
Expand Down
2 changes: 1 addition & 1 deletion studio/schemas/objects/compensations/salariesByLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SalariesInput } from "../../../components/salariesInput/SalariesInput";
import { SalariesPage } from "../../../lib/payloads/compensations";

export const salariesByLocation = defineField({
name: "salaries",
name: "salariesByLocation",
title: "Salaries by Location",
description:
"Yearly salary data specific to a particular location. Each location should have a unique entry with the yearly salaries for that location.",
Expand Down

0 comments on commit cac1ea9

Please sign in to comment.