feat: delivery areas drawn on a map: the customer pins the address (plan 6R.G)
- services/fees.py: the site's engine (shapes matched by the pin), shared cases - checkout: price_cart(pin=), delivery_areas with kind (+ geometry for shapes), venue_point in the public menu (postcodes and rules stay on the cloud) - orders: quote / create take lat / lng; online_orders.lat / lng (Alembic 0007), sent to the site with the pending orders - order app: PinMap (Leaflet + OpenStreetMap tiles), 'Pin it on the map' first when the venue drew areas, the browser's location offered; lat / lng sent - tests: cloud test_fees (pinned quote and order), order-app logic Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""online orders: lat / lng, where the customer pinned the delivery (plan 6R.G: areas drawn on a map)
|
||||
|
||||
Revision ID: 0007_order_pin
|
||||
Revises: 0006_order_table_id
|
||||
Create Date: 2026-11-23 23:55:00
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0007_order_pin'
|
||||
down_revision = '0006_order_table_id'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
with op.batch_alter_table('online_orders', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('lat', sa.Float(), nullable=True))
|
||||
batch_op.add_column(sa.Column('lng', sa.Float(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
with op.batch_alter_table('online_orders', schema=None) as batch_op:
|
||||
batch_op.drop_column('lng')
|
||||
batch_op.drop_column('lat')
|
||||
Reference in New Issue
Block a user