From ecf0c7445b615e158f4d1577cc293fe3500f061b Mon Sep 17 00:00:00 2001 From: Adam Antal Date: Tue, 17 Sep 2024 10:45:00 +0200 Subject: [PATCH] Refactor reservation helper to include volume information in periodicals --- src/components/reservation/helper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/reservation/helper.ts b/src/components/reservation/helper.ts index 096411b345..7d3cb598e5 100644 --- a/src/components/reservation/helper.ts +++ b/src/components/reservation/helper.ts @@ -54,7 +54,10 @@ export const getFutureDateStringISO = (num: number) => { return futureDate; }; -type Periodical = Pick; +type Periodical = Pick< + PeriodicalEdition, + "volumeNumber" | "volumeYear" | "volume" +>; const constructReservation = ({ manifestation: { pid }, @@ -116,6 +119,7 @@ export const constructReservationData = ({ ...(periodical ? { periodical: { + volume: periodical.volume, volumeNumber: periodical.volumeNumber, volumeYear: periodical.volumeYear }