brunorplima / divino-dog-menu-app

Automated menu and order app for Divino Dog
divino-dog-menu-app.vercel.app
0 stars 0 forks source link

Disable menu item button on days it's not served #117

Closed brunorplima closed 2 years ago

brunorplima commented 2 years ago

NOTE: Only start this one after PR #116 was merged and you've pulled latest from main.

The weekDays property was added to the MenuItemModel in the mentioned PR and now we're able to find out if the current day is a day that offers that menu item or not. Based on that, we won't allow the user to add that menu item to the cart, but I think it's still good to keep the button there so customers that visit on another day will know there's that option on other days. For now, we can disable that button and somehow inform the user that that menu item is only available on certain days.

NOTE: On PR #116 it was added to the menu item model a function called availableDaysToString that returns a string format of the days that that item is available, examples: image image Use this function to make your life easier when informing user about days item is served