Editor - Delivery zone

List the delivery areas of the business and this opens with the function showDeliveryZone() in the view theme/views/editor/business.html

Main Models

  • deal.zones: contains all business zones in an array
  • curNewZone: This is reserved to create a new business
  • curNewZone.price: delivery price for a new area
  • curNewZone.minimun: minimum in order for a new zone
  • curNewZone.name: name for a new zone

Utility Functions

  • hideDeliveryZone(): close this modal
  • removeDeliveryZone(zone): delete a delivery area
  • showDeliveryZoneSettings(zone): opens a modal that with the details of the delivery area, this serves to modify your data
  • updateDeliveryZone(zone): updates data from the delivery area.

Example of base theme

719719
  1. deal.zones listed, if something changes, it activates the function updateDeliveryZone(zone)
  2. updateDeliveryZone
  3. showDeliveryZoneSettings
  4. removeDeliveryZone
  5. curNewZone
  6. showDeliveryZoneSettings but to add a new delivery zone.