* porting the open/close validation for a restaurant for the 12:00/00:00 format for the next day
* grouping the open/close restaurants to sort them together
The orders were set as delivery only if the word "delivery" was used. I changed the logic to be delivery as default and only as takeout if the word "takeout" was used. If neither of them was used, the order will be flagged as for delivery, but also logged in the system, in the Log table to debug further what is wrong with it.
* the admin controller loads the testing community as the default for new restaurants
* the Community model encapsulates the testing community fetching
* the view accepts not setting a default community
* centralize the way the restaurant's fax is fetched
* adding Notification types as class constants to reduce possible bugs
* centralize the way to get the restanurant's email address
* improve code readability in the CSV exporter
* adding restaurant fax and email to the CSV
(Order.php:726)
Added a function that returns the last tip the user gave.
(User.php:52)
Added a call to the function Order::lastTip(). So the last tip will be exported at the user's api.
(app.js:876)
Added the line to get the last tip the user gave.
- action in the api/restaurant controller to set the dishes categories
- method in the Restaurant model to store the categories associated to the restaurant
- improved the way the add category looks in the admin/restaurant view and CSS file
- refactorize the methods in the admin JS app, so the methods were outside every object to be able to use the IDE outliner to show the methods outside the onload function, helps sorting the work folding the methods
- added the _saveCategories() method in the JS admin app to send the categories to the api/restaurant controller
- added the _saveCategories() to the saveRestaurant method
- made the getValues() method a global function to reuse it
- added a App.createCategory() to add a new category in the DOM to be stored later
- the admin app, onLoad method does not define any functions inside it anymore
* the API for restaurant stores now the notifications
* The restaurant model stores now the notifications
* detect the notification to know what type of notification it is to store it in as the right type
* restaurant model includes now the notification models assigned to it
* the notifications in the restaurant model are filtered by active only if the admin is not logged in
* the notifications in the restaurant model now accept a where filter
* prototype for the notifications form
* included the notifications.js model
* added the admin.js method to populate the notifications form
* loading the notifications in the restaurant.js model
Issue 635: Suggestion.
Added the Suggestion's model.
Added the Suggestion's controller.
Added some Suggestion's viewers.
Added the Suggestion's options at the admin menu.
Added some CSS classes at the admin.css.
Added the object App.suggestions at the admin.js file.
At the javascript side is being used the App.ceil function at the
result of the sum of the products's price (app.js:1281). The same
function is being used to round the values of the tax (app.js:1315) and
tip (app.js:1324). But at the PHP side this function Util::ceil was
called just at the sum of all itens (products price + tax + tip). So I
put the Util::ceil after the sum of the products price (Order.php:45),
after the tax calculation (Order.php:63) and after the tip calculation
(Order.php:58).
Problem only happened in Chrome/webkit browsers. The sort order was only using the open/close values, rewrote the sort function
* addded the sort order information to the restaurants export in the Community model to use that value in the JS/frontend to sort them
* rewrite the way the order/open information is used to sort the restaurants in the JS/frontend