tastyigniter / TastyIgniter

:fire: Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants
https://tastyigniter.com
MIT License
3.01k stars 987 forks source link

When adding an allergen in single restruant mode, it errors saying the location field is required, but one isn't shown #712

Closed othyn closed 3 years ago

othyn commented 3 years ago

Expected behavior: When creating a new allergen in single restruant mode, the default restruant should be used without showing a location select field.

Actual behavior: When creating an allergen via the /admin/allergens/create view, you can provide a name and description, but when the form is submitted it errors out saying "The locations field is required.". A location dropdown is not displayed, I'm assuming because the application is in single restruant mode.

screenshot

Reproduce steps: Whilst in single restruant mode, try to create an allergen under the /admin/allergens/create page. Enter the required information to pass validation, and it will fail saying a location is required, even though no location field is prompted, in which I'm assuming is because the app recognises that it's in single location mode.

Version: v3.0.4-beta.27

Additional Information: None.

diverds1992 commented 3 years ago

I had to change this file app > admin > requests > Allergen.php

remove 'location' => 'required"

othyn commented 3 years ago

Haha looks like it was fixed an hour ago!

https://github.com/tastyigniter/TastyIgniter/pull/709

othyn commented 3 years ago

Closed by #709