diff --git a/src/components/reservation/UserListItems.tsx b/src/components/reservation/UserListItems.tsx index a007f14e73..8ca023f373 100644 --- a/src/components/reservation/UserListItems.tsx +++ b/src/components/reservation/UserListItems.tsx @@ -22,7 +22,7 @@ import { } from "./helper"; import PickupModal from "./forms/PickupModal"; import NoInterestAfterModal from "./forms/NoInterestAfterModal"; -import { InterestPeriods } from "./types"; +import { Periods } from "./types"; export interface UserListItemsProps { patron: PatronV5; @@ -51,7 +51,7 @@ const UserListItems: FC = ({ }) => { const t = useText(); const config = useConfig(); - const interestPeriods = config("interestPeriodsConfig", { + const interestPeriods = config("interestPeriodsConfig", { transformer: "jsonParse" }); diff --git a/src/components/reservation/forms/NoInterestAfterModal.tsx b/src/components/reservation/forms/NoInterestAfterModal.tsx index d7e2a10c3b..2451f0be33 100644 --- a/src/components/reservation/forms/NoInterestAfterModal.tsx +++ b/src/components/reservation/forms/NoInterestAfterModal.tsx @@ -3,7 +3,7 @@ import { useText } from "../../../core/utils/text"; import ModalReservationFormSelect from "./ModalReservationFormSelect"; import { useConfig } from "../../../core/utils/config"; import { RequestStatus } from "../../../core/utils/types/request"; -import { InterestPeriods } from "../types"; +import { Periods } from "../types"; export interface PickupModalProps { selectedInterest: number; @@ -22,7 +22,7 @@ const NoInterestAfterModal = ({ }: PickupModalProps) => { const t = useText(); const config = useConfig(); - const interstPeriods = config("interestPeriodsConfig", { + const interstPeriods = config("interestPeriodsConfig", { transformer: "jsonParse" }); diff --git a/src/components/reservation/helper.ts b/src/components/reservation/helper.ts index 4038851203..b20c5a97a2 100644 --- a/src/components/reservation/helper.ts +++ b/src/components/reservation/helper.ts @@ -19,7 +19,7 @@ import { PeriodicalEdition } from "../material/periodical/helper"; import { ModalReservationFormTextType } from "./forms/helper"; import invalidSwitchCase from "../../core/utils/helpers/invalid-switch-case"; import { SubmitOrderStatus } from "../../core/dbc-gateway/generated/graphql"; -import { InterestPeriods } from "./types"; +import { Periods } from "./types"; export const isConfigValueOne = (configValue: string | undefined | string[]) => configValue === "1"; @@ -31,7 +31,7 @@ export const getPreferredBranch = (id: string, array: AgencyBranch[]) => { export const getNoInterestAfter = ( days: number, - interestPeriod: InterestPeriods, + interestPeriod: Periods, t: UseTextFunction ) => { const interestPeriodFound = interestPeriod.interestPeriods.find( diff --git a/src/components/reservation/types.ts b/src/components/reservation/types.ts index 5d2ed21c08..5780e3ebd3 100644 --- a/src/components/reservation/types.ts +++ b/src/components/reservation/types.ts @@ -1,6 +1,6 @@ import { Option } from "../Dropdown/Dropdown"; -export type InterestPeriods = { +export type Periods = { interestPeriods: Option[]; defaultInterestPeriod: Option; };