Refactor Zone interface to use separate shipping schedule fields
Replace single deliverySchedule field with shippingScheduleStart and shippingScheduleEnd for more granular control over delivery time windows. Update both Leaflet and Libre adapters to display the new fields. Co-Authored-By: David Nguyen <david.nguyen@goutezplanb.com> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
46e6f7f44a
commit
ef665f7bf1
15526
package-lock.json
generated
Normal file
15526
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -116,7 +116,8 @@ export class LeafletAdapter implements IMapAdapter<Marker> {
|
||||
<div >
|
||||
${zone.name ? `<p><strong>${zone.name}</strong></p>` : ''}
|
||||
${zone.shippingFee ? `<p>Shipping: ${zone.shippingFee}</p>` : ''}
|
||||
${zone.deliverySchedule ? `<p>Delivery: ${zone.deliverySchedule}</p>` : ''}
|
||||
${zone.shippingScheduleStart ? `<p>Delivery: ${zone.shippingScheduleStart}</p>` : ''}
|
||||
${zone.shippingScheduleEnd? `<p>Delivery: ${zone.shippingScheduleEnd}</p>` : ''}
|
||||
</div>`)
|
||||
.openOn(this.map);
|
||||
}
|
||||
|
||||
@ -154,7 +154,8 @@ export class LibreAdapter implements IMapAdapter<Marker> {
|
||||
<div class="delivery-zone">
|
||||
${zone.name ? `<p><strong>${zone.name}</strong></p>` : ''}
|
||||
${zone.shippingFee ? `<p>Shipping: ${zone.shippingFee}$</p>` : ''}
|
||||
${zone.deliverySchedule ? `<p>Delivery: ${zone.deliverySchedule}</p>` : ''}
|
||||
${zone.shippingScheduleStart ? `<p>Delivery: ${zone.shippingScheduleStart}</p>` : ''}
|
||||
${zone.shippingScheduleEnd? `<p>Delivery: ${zone.shippingScheduleEnd}</p>` : ''}
|
||||
</div>`)
|
||||
.addTo(this.map);
|
||||
}
|
||||
|
||||
@ -15,7 +15,8 @@ export interface Zone {
|
||||
opacity?: number;
|
||||
polygon: GeoPoint[];
|
||||
shippingFee?: number;
|
||||
deliverySchedule?: string;
|
||||
shippingScheduleStart?: string;
|
||||
shippingScheduleEnd?: string;
|
||||
}
|
||||
export type LatLng = [number, number];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user