Answer the question
In order to leave comments, you need to log in
Workstation on Yii2. How to implement the formation and preservation of dynamic information?
Hello! I am making an workstation for a cleaning department manager. I decided to choose the Yii2 framework. To make it clear in general what is at stake, here is the database schema
, and the view of the main window with explanations
The problem is this - When reserving (settlement) of the client in the specified room, the start date of the reservation and departure is set.
From the start date (for example, 03/02/2015) to the check-out date (for example, 03/20/2015), the room must be cleaned on the day of arrival, departure, and once every 7 days on the day specified by the client (for example, on Tuesday every week).
I did everything except regular cleaning, I don’t know how best to implement regular cleaning.
So far I have 3 options:
1) I need to make some kind of additional table with records for each room reservation;
2) you can also make calculations in the model for each actual booking, but this is the worst option because not flexible.
3) Do the same calculations on the JS client side.
What if the client changes "cleaning day" from Tuesday to Wednesday.
Perhaps there are some tools in Yii2 that will simplify my task, for example, working with Redis, etc.!
Tell junior how to do it better! Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question