Skip to content

Commit

Permalink
fix: series empty buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
joonatank committed Dec 18, 2024
1 parent 29f9b3d commit b62dd88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ function RecurringReservationForm({
const buffers = {
before: data.bufferTimeBefore
? getBufferTime(reservationUnit.bufferTimeBefore, data.type)
: undefined,
: 0,
after: data.bufferTimeAfter
? getBufferTime(reservationUnit.bufferTimeAfter, data.type)
: undefined,
: 0,
};

try {
Expand Down
4 changes: 2 additions & 2 deletions apps/admin-ui/src/spa/reservations/[id]/series/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ function SeriesPageInner({ pk }: { pk: number }) {
endDate: toApiDateUnsafe(fromUIDateUnsafe(values.endingDate)),
endTime: values.endTime,
weekdays: values.repeatOnDays,
bufferTimeBefore: buffers.before?.toString(),
bufferTimeAfter: buffers.after?.toString(),
bufferTimeBefore: (buffers.before ?? 0).toString(),
bufferTimeAfter: (buffers.after ?? 0).toString(),
skipDates: skipDates.map((x) => toApiDateUnsafe(x)),
};
const mutRes = await mutate({ variables: { input } });
Expand Down

0 comments on commit b62dd88

Please sign in to comment.