paket-core / explorer

0 stars 0 forks source link

Add vehicle and price fields to secondary forms #19

Open israellevin opened 5 years ago

israellevin commented 5 years ago

Some forms (change location, relay, and receive) should have two extra fields - vehicle (free text with completion from history) and cost (a string representing a number). The cost is a bit confusing, so read carefully: it has nothing to do with the payment in BUL, and is actually the cost in Shekel for the courier. Since this value is only known at the end of every leg, we need to use the following logic: 1) Send a 'change location' event as the participant currently holding the package (the "custodian") with the vehicle and price in kwargs 2) Do any bridge related activities if needed 3) Send the actual event of the form as the new courier

Please talk to me if this is not perfectly clear.

Both these fields will be added to the kwargs json. I think this requires no changes in the server. @yaroslavr-itd , am I correct?

yaroslavr-itd commented 5 years ago

/changed_location - the only event-endpoint, which has not kwargs argument. I will fix it. Also, for /accept_package we have only leg_price argument (as we discussed in PM).

israellevin commented 5 years ago

Moving the server side of this discussion to a router ticket: https://github.com/paket-core/router/issues/20