Thank you always for answering, I already sent you a private message 7 days ago that I still have no answers, so I am looking at solutions because the project is running behind me.
I already tried many formulas but I still can’t do it, when it’s a day it’s great, but when I want to mark several days, I update the reservation but instead of accumulating those days it modifies all of them, that is, I click on day 1 (the reservation is created ) with the initial day and when I click on day 2,3,4 I don’t know how to load them in the reservation
Before moving forward, in development, before making it look nice with a component we need to solve the problem.
So, if we forget about the calender component and think about the data we have stored. Have you figured out how this works?
Reservation systems get complex, and nocode makes it a little more constrained. If you are making a car rental system, usually you have a fleet of cars. You do not book a specific car with a license plate X, you book a Honda (or even a small car). So your system does not need to check if that car is available. You need to check if ANY car that meets the criteria is available. Then there is additional business logic that says, a person might call and extend their rental. We need to always have 1 car free (sounds easy, buy a new car that you don’t rent out, but what if 2 customers increase their rental).
But, you came with a specific problem so we can try to solve that. Can you send me a screenshot (or shots) if the NOCODE calender parameters (I don’t have that component) so I can see what configuration is possible. Also send a screenshot of your database tables so I can understand the linking. Then we can proceed
Hello, thanks for the answers, My colections (cars, yachts, real estate), another that is unavailable days (of cars, yachts, inluebles, users and reservations
The calendar takes all available days, when a user clicks on day 1/12 the system already creates a non-available day of current car / yacht / property and that day no one can reserve it, it also creates a current car reservation, yacht, property.
reservation start day is the day you clicked
This calendar allows me to click on each day and that generates an action, where I am stuck is when I want to mark several days as I can update the current reservation with those days that I clicked, I thought to make the system of adding favorites as add current date to current reservation but I can’t.
Each click is like a toggle that you create or update
Okay, I think I see. There are many ways to solve this problem. My preferred technique is to create a new table that acts as a “cart” for the shopper. Every time the user clicks the marking calendar it will create or delete a record in the “cart”. We create on marked, and delete on unmarked Once the user clicks on “reserver” or the transaction is completed I then take the MIN date and the MAX date of the cart and create a record of start and finish date and delete all records in the cart.
As an extra step, if I need to ensure that the dates are consecutive (you cannot reserve for the 21 23 and 25, but you need 21 22 23 24 and 25) then you check the difference between the start and end date and the number of days. If they are not equal then you display a message “you must book consecutive days, do you accept this as the start date and this as the end date”?
Great, now I’m going to try to do it and if I have any questions I’ll ask you … Thank you very much
great as an order app, the collection of orders items
Thanks @TKOTC for the help, there I could create the daycart of the reservation and thus accumulate the date and deactivate it in the calendar, what I need now to solve is:
When I create the daycart and I want to delete one, it does not delete that day, but the last one loaded in the collection
By clicking on the day I create a collection of reserve items (where I accumulate the dates) and create a non-available day (to remove that date from the calendar)
The user can see the selected dates (list of reservation items) and can eliminate that item from the reservation and the NOT available day must also be eliminated so that another user can eliminate it, but it does not delete me that day, that is, I select 1, 2,3,4 and I want to delete 4 and it deletes me on day 1 instead of 4