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

2.x quick forms #34

Merged
merged 9 commits into from
Nov 2, 2021
Merged

Conversation

paul121
Copy link
Collaborator

@paul121 paul121 commented Nov 1, 2021

This is still in "draft" stage - no submission logic on these forms, but they do include most of the fields in the UI!

Todo:

  • Determine the fate of the drilling quick form (do we still want this?)
  • Add ajax for spraying chemicals & # of harvest fields
  • Add submit logic

@paul121
Copy link
Collaborator Author

paul121 commented Nov 1, 2021

Also a major todo item is to determine what kind of "widget" we want to use for selecting plots (when not using views bulk actions to navigate to the plots)

@paul121
Copy link
Collaborator Author

paul121 commented Nov 1, 2021

Implemented an action for the Operations quick form for demo purposes.

@paul121
Copy link
Collaborator Author

paul121 commented Nov 2, 2021

I noticed tests were not running on this PR. Presumably because it is from my private fork.

This seems to have fixed it: 11fc106

Credit to: WordPress/gutenberg#17324 (comment)

@paul121 paul121 merged commit c6e3b43 into Rothamsted-Ecoinformatics:2.x Nov 2, 2021
@paul121 paul121 deleted the 2.x-quick-forms branch November 2, 2021 20:16
@paul121
Copy link
Collaborator Author

paul121 commented Nov 2, 2021

I'm going to go ahead and merge this as-is. We'll use these stubs for demo purposes and can finish the todos in a followup.

@aislinnpearson
Copy link
Collaborator

HI Paul,

To try answer a couple of your questions:

  1. Yes, we do still want a drilling quick form. The current 1.x drilling quick form creates a planting asset and a drilling record. Ideally in 2.x the farm manager would create a planting asset via a planting asset quick form, and then the farm operator would create a drilling log via a drilling quick form which is assigned to that planting asset. I realise that in 2.x a drilling can be an asset but I have separated them here because the responsibility lies with different people (deciding the planting and its location is the job of the farm manager, while drilling is the responsibility of the farm operator).

  2. I am not sure what an ajax is, or if you need my help with the logic. I assume not

  3. I noticed that you created an operations quick form for demo purposes but I couldn't find it on the .dev site? Let me know if I am missing something there.

@paul121
Copy link
Collaborator Author

paul121 commented Nov 4, 2021

Thanks for the info @aislinnpearson

  1. The farm manager vs farm operator is good context. I think we should give this some more thought in a call.
  2. Yes, sorry, ajax is just a technical todo! (informed by other decisions)
  3. I don't believe the .dev site has been updated yet - we'll let you know when it has been updated with the quick form.

@mstenta
Copy link
Collaborator

mstenta commented Nov 5, 2021

Ideally in 2.x the farm manager would create a planting asset via a planting asset quick form

@paul121 I wonder if we should go ahead and port the Planting quick form from 1.x for this purpose. There was some discussion of implementing it only in the crop plan, but that might be too limiting. And now that we're experimenting with essentially linking to quick forms from plans, it might be able to work both ways!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants