ever-co / feature-requests

Feature requests for Ever® Platforms
https://ever.co
11 stars 1 forks source link

Open and close restaurant #46

Open morggansoft opened 4 years ago

morggansoft commented 4 years ago

To avoid for a customer to order when the restaurant is not open (or in other cases, like there is no delivery available, or the restaurants just doesn't want to sell through the app), the shopping service should be opened and closed manually.

evereq commented 4 years ago

So basically somewhere on the Merchant management page, we need to add switcher "Open / Close" which should set some property "isActive" for Merchant. See https://github.com/ever-co/ever/blob/develop/packages/common/src/entities/Warehouse.ts#L58 and also https://github.com/ever-co/ever/blob/develop/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts#L84 and also https://github.com/ever-co/ever/blob/develop/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts#L84, etc.

Next, when we search for available products from near by merchants we should only use merchants which are set as active, see https://github.com/ever-co/ever/blob/develop/packages/core/src/services/geo-locations/GeoLocationsWarehousesService.ts#L49 - I am not sure, could be it's all done already and we only need to add a switch in UI, because it looks like activeOnly boolean field exists, etc.