Admin must edit booking dates after booking is placed

Discuss everything related to PHP Hotel Site. All versions. Any questions related to the PHP Hotel Site developing or using should be posted to this forum.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

PrinceOfAbyss
Junior
Junior
Posts: 17
Joined: Apr 1st, '18, 23:17

Admin must edit booking dates after booking is placed

Postby PrinceOfAbyss » Jun 19th, '18, 18:40

I have to extend the script in a way that an admin can edit the dates (especially the departing date) of a placed booking.

First of all, I have seen similar topics where this feature is requested and I know it's not offered yet.

I also made the appropriate studying of the code and have gathered the pieces of code I need to utilize/replicate in order to check for the new availability, and also for any additional (if the new date is later), or less (if the new date is sooner) fees that may occur by changing the original departing date.

The problem is I can't find a proper screen to implement the feature while keeping it meaningful but also elegant. Let me explain what I mean.

  • One candidate was the Bookings > Bookings page, but it, being a Viewing page, doesn't make much sense to offer Editing capabilities there. Also, technically, because it's using your Data Grid framework, I'm not sure it would be easy or even possible to implement.
  • Another candidate was the Bookings > Bookings Editing page (the one opening when you click on the little edit/pen icon). The problems there are quite many. First, it doesn't include at all the arriving/departing dates. OK, they could be easily included by altering the appropriate queries, even though they are pulled from the bookings_rooms table. But still I'm not sure it makes sense to simply display the dates in two fields, and let the admin alter them once and make the script alter all departing dates of all rooms a single booking may contain.
  • Then, I thought I should create again in the Bookings > Bookings Editing page a Reservation Details room table, similar to the one present in the Description or Invoice links where the dates would be editable for each of the rooms included within a single booking. However, that would still be technically impossible, as the Editing page is also utilizing the Data Grid framework, making what can be displayed (custom made) in the page extremely limited.
  • Then, I thought to add a little calendar icon between the edit/pen icon and the recycle bin icon, which would open a new page where I could display the table mentioned above and change there the desired dates, performing also the necessary availability/cost checks. This, while seeming the best solution, it is again either very hard or not possible at all to implement, because adding this calendar icon without changing the Data Grid framework's class to display it is not possible.

As you see and as I said before, I want the implementation to also be elegant besides being functional.

So, I'm mostly addressing this to the script's devs. Where do you think I should implement the feature? Where would/will you implement it when/if you decide to offer it in a future version of the script?

Thanks in advance.

PrinceOfAbyss
Junior
Junior
Posts: 17
Joined: Apr 1st, '18, 23:17

Re: Admin must edit booking dates after booking is placed

Postby PrinceOfAbyss » Jul 11th, '18, 01:19

After so much time without a response, I just want to tell you that I have done it myself.

If the authors would like more info, or any other customers, just let me know!

PrinceOfAbyss
Junior
Junior
Posts: 17
Joined: Apr 1st, '18, 23:17

Re: Admin must edit booking dates after booking is placed

Postby PrinceOfAbyss » Jul 11th, '18, 01:36

And some photos of the interface I finally chose to implement!

1.JPG
1.JPG (128.58 KiB) Viewed 45 times


2.JPG
2.JPG (60.15 KiB) Viewed 45 times


3.JPG
3.JPG (85.22 KiB) Viewed 45 times

PrinceOfAbyss
Junior
Junior
Posts: 17
Joined: Apr 1st, '18, 23:17

Re: Admin must edit booking dates after booking is placed

Postby PrinceOfAbyss » Jul 11th, '18, 01:37

4.JPG
4.JPG (75.86 KiB) Viewed 44 times

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: Admin must edit booking dates after booking is placed

Postby administrator » Jul 11th, '18, 13:13

:D


Return to “ApPHP HotelSite / uHotelBooking Talk {developers/users}”