Skip to content

Commit

Permalink
Merge pull request #217 from itk-dev/feature/support-1201-itkdev_book…
Browse files Browse the repository at this point in the history
…ing-edit-delete-bookings

SUPPORT-1201: Fixed editing/deleting bookings errors in itkdev_booking
  • Loading branch information
martinyde authored Sep 14, 2023
2 parents 8db6fb3 + b517848 commit 0f4054d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Nedenfor ses dato for release og beskrivelse af opgaver som er implementeret.

## In develop

* Fixed editing/deleting bookings errors in itkdev_booking.
* Disable access to webform error log
* Added retry action to error log
* Changed failed jobs view
Expand All @@ -19,7 +20,6 @@ Nedenfor ses dato for release og beskrivelse af opgaver som er implementeret.
1.1.3](https://github.com/itk-dev/os2forms_sync/releases/tag/1.1.3)
* Enable os2forms_webform_maps and related contrib modules


## [2.4.9] 2023-09-06

* Tilføjede webform options config ignore.
Expand Down
6 changes: 3 additions & 3 deletions web/modules/custom/itkdev_booking/assets/dist/main.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions web/modules/custom/itkdev_booking/assets/src/user-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function UserPanel({ config }) {

setChangedBookingId(bookingId);

const booking = userBookings.find((el) => el.id === bookingId);
const booking = userBookings["hydra:member"].find((el) => el.id === bookingId);

if (booking) {
booking.start = start;
Expand All @@ -43,7 +43,8 @@ function UserPanel({ config }) {
const onBookingDeleted = (bookingId) => {
setDeleteBooking(null);

const newUserBookings = userBookings.filter((el) => el.id !== bookingId);
const newUserBookings = {...userBookings};
newUserBookings["hydra:member"] = newUserBookings["hydra:member"].filter((el) => el.id !== bookingId);

setUserBookings(newUserBookings);
};
Expand Down

0 comments on commit 0f4054d

Please sign in to comment.