Skip to content

#48 6.4 adminpage manage bookings#63

Merged
AlexCode-dot merged 11 commits intomainfrom
6.4-Adminpage-manage-bookings
Jun 4, 2025
Merged

#48 6.4 adminpage manage bookings#63
AlexCode-dot merged 11 commits intomainfrom
6.4-Adminpage-manage-bookings

Conversation

@AlexCode-dot
Copy link
Owner

@AlexCode-dot AlexCode-dot commented Jun 2, 2025

Pull Request Type

Please check the type of change your PR introduces:

  • Feature (a new feature for the project)
  • Fix (a bug fix)
  • Chore (updating grunt tasks etc; no production code change)
  • Refactor (refactoring production code)
  • Docs (changes to the documentation)
  • Style (formatting, missing semi colons, etc; no production code change)
  • Test (adding missing tests, refactoring tests; no production code change)

Description

This PR introduces complete booking management functionality for the admin UI.

It includes:

  • View all bookings with filters for name, movie, room, and date.

  • Show booked seats with visual seat map.

  • Enable editing of booked seats via modal.

  • Update booking seats with feedback and validation.

  • Delete bookings with confirmation modal.

  • Display success and error messages with reusable ErrorMessage and SuccessModal components.

Motivation and Context

Admin users need a efficient and easy UI to manage bookings for example, customer support, capacity monitoring, and operational flexibility. This feature introduces a booking management panel where admins can:

  • Quickly locate and filter bookings by movie, room, or date.

  • Visually inspect which seats have been booked using a seat map.

  • Edit seat selections in response to customer inquiries or errors.

  • Cancel bookings directly from the admin interface if necessary.

All these things are important to make user experience better.

How Has This Been Tested?

Jest tests for booking API routes and methods
Manually testes on dev localhost

Screenshots (if appropriate):

Here is the overview of all bookings where admin can filter by different things:
Screenshot 2025-06-02 at 23 30 33

Here is the booking overview where admin can see what seats belong to the booking
Screenshot 2025-06-02 at 23 31 10

If admin press "redigera platser", they can edit and change bookings seat selection:
Screenshot 2025-06-02 at 23 31 23
If admin does not press "redigera platser" before trying to edit it will not work:
Screenshot 2025-06-02 at 23 31 44

Success message if updated booking was succesful:
Screenshot 2025-06-02 at 23 31 33

Admin user gets a extra warning/confirmation when trying to delete booking:
Screenshot 2025-06-02 at 23 32 04

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have named this PR according to following naming convention: #[issue-number] PR description

Additional Information:

Related Issues:

#48

- Setup booking api routes, GET, PATCH, DELETE
- Setup bookingDbService logic for routes
- Added api route for screening with detailed data populated with movie/room data (did not want to break roberts restful api structure)
- Setup frontend API fetch functions
- Added "handle booking" section in admin page
- Added logic for manage booking(filter, uodate, delete etc)
- Added styling for all Admin bookings components
- Added some error handling/validations in frontend & backend
- Fixed bug where user chould select seats when ticketcount was = 0
- Added tests for booking API routes for GET, PATCH and DELETE
- Added loading state for better UX
@vercel
Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kino-next-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 5:43pm

- case-sensitive fix
@Fagerdahl
Copy link
Collaborator

Looks very good!!
Is "Alle" a Typo 🤔 And also, it has a minor merge conflict, is it easy to adjust?

@AlexCode-dot
Copy link
Owner Author

Looks very good!! Is "Alle" a Typo 🤔 And also, it has a minor merge conflict, is it easy to adjust?

Fixed the merge conflict, where is the typo u referring to?

Copy link
Collaborator

@Deansie Deansie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, I'm really impressed by your work with the admin panel, incredible! Looks good and works as intended, approved. 👍

@AlexCode-dot
Copy link
Owner Author

Once again, I'm really impressed by your work with the admin panel, incredible! Looks good and works as intended, approved. 👍

Thank u so much :)

@AlexCode-dot AlexCode-dot merged commit 4fb0cfd into main Jun 4, 2025
3 checks passed
@AlexCode-dot AlexCode-dot linked an issue Jun 5, 2025 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6.4 Adminpage manage bookings

3 participants