* make the dish options to be returned using the return value
* made the SQL query to fetch the options readable
* added the sort value to be stored in the Restaurant model
* added style to the CSS to make it clear what the sort field was used for
* added the sort value to be sent when storing the options
* added the sort field to the option form
* return the categories for a restaurant, order by the sort field
* improved the way the field forms are shown, using the new CSS class labeled-fields
* added the category input fields to be able to rename and resort the category
* changed the JS to add the new fields to the API call to store the category changes
* refactorize the save restaurant controller, to have the save block in it's own private method
* created a flashMessage static method in the Crunchbutton_Session class to handle the "saved" messages as flash messages.
* creating a flashWidget that returns a JQuery UI widget with the message in the session
* added the flashWidget to the restaurant view
* moved the protected _jsonBoolean() method to the Cana_Table as it's something to be used in different models
* moved the protected _mergeWhere() method to the Cana_Table as it's something to be used in different models
* use the _mergeWhere() to show the inactive dishes in the admin
* use the _mergeWhere() to show the inactive notifications in the admin
* added protected _jsonBoolean() metod to turn json boolean values to something Cana_Table understood to disable the items
* added the sort field to the array of data to be send
* improved the way the dish form looks like because of the different fields
* added the sort form field to the admin.js and the sort value to the saveDishes() js action
* changed "Contact Crunchbutton.com: 800-242-1444." to "To contact Crunchbutton, text us back."
* left the way to fetch the phone number for future references
* validates the empty arrays for hours and dishes before trying to save them
* refactorize the Restaurant model to make it more readable
* addign documentation to the save*() methods
* 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