From b8cc8bd4214a9565dac9b95c46ad1abcd06ac3bd Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Sat, 3 Jan 2026 00:15:30 +0200 Subject: [PATCH] feat: Add Google Places autocomplete for address search - Add address search input field with autocomplete - Integrate Google Places API to provide address suggestions - Parse selected address components and auto-populate form fields - Address fields initially hidden, show when address is selected - Add clear button to reset address selection - Support South Africa locations with country restriction - Add Google Places API key config to services.php - Hide/show address fields based on selection and validation errors --- config/services.php | 4 + resources/views/checkout.blade.php | 202 +++++++++++++++--- .../3eb3669279660d3820de15e6e8eeb5d9.php | 2 +- .../51014d56a8722c9e42a71af3c62d81a5.php | 49 +++++ .../963a42c38bd8e0fdfe0b4e765ea9f100.php | 37 +++- 5 files changed, 260 insertions(+), 34 deletions(-) create mode 100644 storage/framework/views/51014d56a8722c9e42a71af3c62d81a5.php diff --git a/config/services.php b/config/services.php index 5686590..b8ed1ef 100644 --- a/config/services.php +++ b/config/services.php @@ -59,4 +59,8 @@ return [ 'redirect' => env('GOOGLE_REDIRECT_URI', '/auth/google/callback'), ], + 'google_places' => [ + 'api_key' => env('GOOGLE_PLACES_API_KEY'), + ], + ]; diff --git a/resources/views/checkout.blade.php b/resources/views/checkout.blade.php index 95aadb8..15e441f 100644 --- a/resources/views/checkout.blade.php +++ b/resources/views/checkout.blade.php @@ -43,7 +43,8 @@ } .form-group input, - .form-group textarea { + .form-group textarea, + .form-group select { width: 100%; padding: 0.75rem; border: 1px solid #ddd; @@ -58,12 +59,51 @@ } .form-group input:focus, - .form-group textarea:focus { + .form-group textarea:focus, + .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(45, 80, 71, 0.1); } + /* Google Places Autocomplete styling */ + .pac-container { + border-radius: 4px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + margin-top: 4px; + } + + .pac-item { + padding: 0.75rem; + cursor: pointer; + } + + .pac-item:hover { + background-color: #f0f0f0; + } + + .address-search-group { + margin-bottom: 1.5rem; + position: relative; + } + + .address-clear-btn { + position: absolute; + right: 12px; + top: 32px; + background: none; + border: none; + color: #999; + cursor: pointer; + font-size: 1.2rem; + padding: 0; + display: none; + } + + .address-clear-btn.show { + display: block; + } + .order-summary { height: fit-content; } @@ -211,42 +251,50 @@ -
Packed At
-packing_completed_at->format('M d, H:i')); ?>
+packing_completed_at ? $order->packing_completed_at->format('M d, H:i') : 'Not packed'); ?>
+ This order is in the status))); ?> phase. + No actions are available at this stage. +
+ + status === 'ready_to_ship'): ?> ++ Next Step: Move Trello card to "Ready to Ship" to trigger automatic shipment creation. +
++ Status: Parcel is awaiting collection from courier. +
+ courier_waybill_id): ?> +
+ Waybill: courier_waybill_id); ?>
+
+ Status: Parcel is in transit to the customer. +
+ courier_tracking_number): ?> +
+ Tracking: courier_tracking_number); ?>
+
+ The order is progressing through the fulfillment pipeline. +
+