Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organizers can update details on a mission from mission control (EPIC) #431

Open
DAHuerta opened this issue May 4, 2020 · 2 comments
Open
Labels
Epic In Progress user story Linked to a user story on airtable

Comments

@DAHuerta
Copy link

DAHuerta commented May 4, 2020

Description

As an organizer, I can open and edit full details of a mission from within mission controls so that I can update missions as I organize them and also so that I can deal with unexpected developments as they occur.

Airtable #162

Figma

@DAHuerta DAHuerta added this to the MVP.0 milestone May 4, 2020
@DAHuerta
Copy link
Author

DAHuerta commented May 4, 2020

According to Airtable Fabian Küntzler is working on this one?

@DAHuerta DAHuerta added Epic user story Linked to a user story on airtable labels May 7, 2020
@jwu910 jwu910 added the sub-task review Review ticket to see if sub-tasks are needed label May 7, 2020
@DAHuerta DAHuerta removed this from the MVP.0 milestone May 7, 2020
@utunga utunga modified the milestone: MVP.0 May 17, 2020
@utunga
Copy link
Contributor

utunga commented May 17, 2020

I realize - now - that I vastly underestimated the complexity of this task. Just saying 'make all fields editable doesn't cut it. My apologies for that. So going to make this a true 'epic' and add a bunch of sub-tasks for each of the aspects of this card here.

(This is per @DAHuerta and @jwu910 new way of handling tasks and with any luck takes into account feedback asking for smaller tasks)

These cards have now been created:

The current designs for the editable view ( I think per @sarahjagrowski ) look like this:

image

However, when we look at this in detail realize there is a whole lot to this and we need to bring in a lot of custom code written for things elsewhere into this edit view. Fortunately, at least some of that code has been componentized for re-use. However, still quite a bit of work hence why I am glad this card is already marked as an 'epic'. It may be possible to have sub tasks so we do this in stages. For instance @laredotornado it is possible that, once you read this you think the best thing to do would be to merge your current PR and then we add new sub-tasks to this one to cover all the various changes.

Anyway, I did an audit of the current schema for MissionControl and come up with the following.

--

Core Fields

"uid": "c16a7714126741fcbaaaee1c842800b8",
"organizationUid": "1",
"createdDate": "2020-05-17T18:58:28.828737",

Not editable, duh.

Create date doesn't need to be visible.

Mission Status

"status": "unassigned",

Display only. Editable elsewhere.

Ideally, we would allow organiser to change this, but messing with status could open up unusual code paths and subtle bugs... so, for now, no.

Organizer can edit this field (in a limited way) directly on the "in progress" and "done" tabs.

Group

"groupUid": null,
"groupDisplayName": null,

Display only. Organizer can edit this field directly on planning tab,

Mission Details

"type": "resource",
"details": [
  {
    "resourceUid": "1",
    "displayName": "Produce Box #1",
    "quantity": 3,
    "type": "foodbox",
    "cost": "25",
    "description": "Frisee and Head Lettuce box - one of every head of lettuce, 1/2 lb bag baby spinach, 1/4lb Italian parsley, 1/4lb cilantro"
  },
  {
    "resourceUid": "1",
    "displayName": "Produce Box #1",
    "quantity": 3,
    "type": "foodbox",
    "cost": "25",
    "description": "Frisee and Head Lettuce box - one of every head of lettuce, 1/2 lb bag baby spinach, 1/4lb Italian parsley, 1/4lb cilantro"
  }
]

Read only

Truth is I'm not at all sure how to handle this. The organiser will in fact need to be able to create missions at some point and that includes selecting what number of what boxes. So we may, in fact, need this to be editable, but unless I am mistaken that would be quite a bit of work to do.

So.. will come back to this one. but let's start by making this 'read only' then we can make an editable version of this a task for another card. A summary of what boxes have been ordered should probably appear the top of the card in 'title' like format.

Funding status

"fundedStatus": "notfunded",
"fundedDate": "",

*Readonly

It is possible to edit funded status elsewhere in the app. However, it also carries with it certain business logic so for now - to keep scope to a minimum - we just ake it ready only here.

Volunteer

"tentativeVolunteerUid": "",
"tentativeVolunteerDisplayName": "",
"tentativeVolunteerPhoneNumber": "",
"volunteerUid": "",
"volunteerDisplayName": "",
"volunteerPhoneNumber": "",

Editable using special component, but not after a mission hs started.

Once a mission is started it should be read only.

If MissionState is X, then:
unassigned - editable
tentative - editable,
assigned - editable
started - read only
delivered - read only
succeeded - read only
failed - read only

There's a special component for assigning volunteers built already - used in Mission Control in planning view. Logic and ideally the actual code should be re-used.

If the volunteer field is changed it should clear volunteerUid field and set tentativeVolunteerUid (requiring volunteer to accept it again).

In readonly or editable mode it should be possible to see whether the voluntter has 'accepted' or is still 'tentative'.

Recipient

"recipientUid": "429d47a71b614e42df5db734cbbec381",
"recipientDisplayName": "Gloria King",
"recipientPhoneNumber": "634-579-2302",

Editable if recipientUid is blank otherwise read only.

If and only if the recipientUid is blank, it should be possible to edit the other two fields, recipientDisplayName, and recipientPhoneNumber. It should not be possible edit RecipientUid per se at all.

Pickup window

"pickUpWindow": {
  "timeWindowType": "afternoon",
  "startTime": "2020-05-17T18:58:28.828764"
},

Should be editable. timeWindowType should be 'exact'.

We can can just make 'exact' the only option for pickupWindow for now. That means we need a date/time picker that sets the pickUpWindow.startTime (as ISO8601 field string) and meanwhile just set pickUpWindow.timeWindowType to "exact".

Pickup location

"pickUpLocation": {
  "address": "1012 N Mariposa Ave #911, Los Angeles, CA 90029, USA",
  "lat": 34.0895079,
  "lng": -118.2988146,
  "label": ""
},

Editable using the AddressAutocomplete component.

This is probably going to require a some design change to fit it in but ;et's do our best.

However, based on UX feedback, we really need the preview in order to ensure that the address doesn't end up wrong and people end up going to the wrong place.

NB: Currently AddressAutocomplete doesn't let you set the 'label' for an address but ideally it would - this would be something like 'McGrath Family Farm'. However for now just reuse the component as is.

Pickup notes

"pickUpNotes": "",

Editable as a text area.

As with AddressAutocomplete there is a notes field right next to the address. This can be called 'pickupNotes' but actually it is the place for notes from organizer to volunteer and vice versa.

We may rename this field later but for now leave it as 'pickupNotes' and yes it has to be editable.

Ready to start

"readyToStart": false,

Editable as a checkbox

In the majority of cases the organizer will come in, set the pickupLocation, the pickup time, maybe put a note in pickupNotes then set the mission 'ready to start'. In other cases they will do these two things as two separate steps. However for the first case, it would be very helpful to have the checkbox right there in edit view.

Delivery Window

"deliveryWindow": {
  "timeWindowType": "as soon as possible",
  "startTime": "2020-05-17T18:58:28.828772"
}

Not visible.

We don't need this for MVP0 - at all. We won't remove it just yet but don't display it or make it editable. This is a contradiction to the design. Sorry.

Delivery Location/Delivery Notes

"deliveryLocation": {
  "address": "5123 W 20th St, Los Angeles, CA 90016, USA",
  "lat": 34.0402893,
  "lng": -118.351885,
  "label": ""
},
"deliveryNotes": "front house on the left of entrance. red light feature outside.",
"deliveryType": "delivery",

Editable using the AddressAutocomplete component.

Generally these fields will be set by the recipient when they request a box. However, it should be possible to edit them also.

Per DeliveryStep.jsx it is possible for deliveryType to be "curbside" or "delivery". Per that view a curbsidePickup checkbox can set this value as follows. Unlike that view we dont want any of the extra guff with warnings and such.

deliveryType: details.curbsidePickup ? "curbside" : "delivery",

DeliveryAddress can be visible all the time but if the checkbox changes deliveryType to 'curbside' clear the deliveryLocation.address, and therefore allow it to change other fields.

Confirmation image

"deliveryConfirmationImage": null,

Not visible on edit view.

This doesn't need to appear in Mission Edit view but should be visible in the Mission Details (read only) view.

Feedback notes/other fields

"feedbackNotes": 2

Not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic In Progress user story Linked to a user story on airtable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants