Closed coderbyheart closed 3 years ago
As far as the GraphQL API for shipments is concerned, we have types, queries and mutations already in place. Please have a look at this ticket: https://github.com/distributeaid/toolbox/issues/26. You can also play with the same api at https://toolbox-staging-distributeaid.cloud.okteto.net/api/graphiql:
@pedro-gutierrez looking at the schema these are the changes needed to implement the proposed features:
dangerousGoods: Boolean
aidGroup: Group!
(to determine which Aid Group Members can edit the shipment)status: ShipmentStatus!
(make enum)members: [Member!]
I understand that we don't have a user concept right now in Toolbox and this needs to be solved first.
As far as dangerousGoods
and the status
field, those can be easily added. I'll plan a ticket for this for the upcoming sprint.
However the aidGroup
property is not 100% clear to me. A shipment is already implicitly linked to two different groups, the pickup group (via the shipment's pickup address) and the delivery group (via the shipment's delivery address).
I think both the aidGroup
and the members
field in a Group
are maybe part of the bigger discussion around authentication and authorisation, where we should define a general model for permissions and group memberships in the toolbox (some ideas drafted in #18).
Maybe a better name would be shippingAidGroup
instead of just aidGroup
to leave other relations open. Only the shipping aid group should be allowed to provide whether a shipment contains dangerous goods or not. The receiving group should not be able to set this property.
It turns out that #49 is not needed but is actually closely related to this issue: we need to implement the "DA Quote Request" form which is used today to collect the necessary information for a shipment.
I am busy this week with moving, so my plan is to rework the process outlined above to include this form. I think it is valuable to implement this form fully, because the MVP already exists (it's the Google Form).
I've started to create JSON schemas for the data collected in the forms: https://github.com/distributeaid/schemas/blob/saga/schemas/quote-request.schema.json
It turns out that this intake form is not used after all anymore.
Why we need this feature
There is a lot of communication happening between Distribute Aid (DA) and Aid Groups (AG) to provide the necessary information for these three lifecycle events of a shipment
Right now it is a big effort to keep everyone in the loop and make sure everyone has the right, and up to date, information. This is a big challenge because all communication happens in different WhatsApp groups.
Bets
We assume that this situation can be greatly improved by:
This will allow DA to point AGs to Toolbox as a single point of entry where they can always find the latest information about their shipments.
Doing so will remove the need for DA to monitor WhatsApp channels and respond to questions. Instead AGs can rely on finding the latest information about a specific shipment on Toolbox.
Experiment
As discussed in this recorded session here is what should go in the first experiment to validate the bet outlined above:
The main purpose is to have the Aid Group confirm that the shipment does not contain dangerous goods.
1. Distribute Aid can create new shipments for an Aid Group
UI mockup
2. Aid Group confirms that the shipment does not contain dangerous data
UI mockup
3. Distribute Aid accepts shipment
UI mockup