Problem/Motivation

Some customers use appointment systems which support and use different locations for making an appointment. Currently, we only support one location which is configured as a default setting (see admin/config/services/dvg_appointments).

Proposed resolution

Add a 'wa_location' component which can be used optionally as an extra step after product choose and before date/time choice. The locations are requested from the service if the client supports it.

Remaining tasks

* create component
* valdiation functions
* add new methods to all clients
* add orchestra6, qmatic3 and lamson clients to dvg_appointemtns
* review
* test all clients

User interface changes

An additional component "Location" which can be used.

API changes

New methods for each client to be implemented:

  public function get_gov_locations() {
    return array();
  }

  public function get_filtered_locations($products) {
    return array();
  }

  public function get_location_details($location_id) {
    return FALSE;
  }

  public function set_location($location_id) {
    return FALSE;
  }

Data model changes

None.

Comments

askibinski created an issue. See original summary.

Danny.Wouters’s picture

Status: Active » Needs work
StatusFileSize
new29.02 KB

The following patch adds the option for multiple locations while booking an appointment.

The new functions are currently only implemented in AppointmentsGPlanMultipleClient. A following patch could add the new functions to all clients.

paulvandenburg’s picture

StatusFileSize
new26.74 KB
new15.44 KB

Further progress on the addition of locations.
However it needs further refactoring, as well as testing if existing clients that don't support locations continue to work as expected.
A few bugs are fixed regarding navigating multi page forms with this new component (see also #2955587: Could not proceed or go back to the previous page when there is no location to select.).

heine’s picture

The patch currently appears to fetch all products, then the available locations per product. In "normal" municipalities, the number of products will exceed the number of locations.

To minimize the number of requests (and thus processing time and roundtrip latency) first asking for locations, then for available products / location would significantly speed up the initial product fetch. Eg; consider the time budget on the initial request product fetch. Assume 2 seconds per request regardless of the type including roundtrip latency, 60 products and two locations.

First products and then locations / product:
2 seconds for the full product list = 2 s
60*2 seconds for the location / product list = 120s

Total: 122 s

First locations and then products per location:
2 seconds for the full location list = 2 s
2*2 seconds for the product / location list: 4s

Total: 6s

joshahubbers’s picture

StatusFileSize
new21.51 KB

Rerolled patch to make it apply in the Dvg 1.8 build

joshahubbers’s picture

StatusFileSize
new21.51 KB

Hm. patch.txt is not the correct extension.

joshahubbers’s picture

StatusFileSize
new26.56 KB

A new patch, which includes all previous, but also the component.

paulvandenburg’s picture

Status: Needs work » Reviewed & tested by the community

Looks good, lets resolve this issue for now.
For further action a new issue can be opened.

  • paulvandenburg committed b2d1a67 on 7.x-1.x
    Issue #2934297 by JoshaHubbers, paulvandenburg, Danny.Wouters: Add...
paulvandenburg’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.