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

Update form by injecting mandatory fields and validate it #1763

Merged
merged 14 commits into from
Sep 11, 2024

Conversation

Sujanadh
Copy link
Contributor

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Describe this PR

This PR depends on osm-fieldwork in order to inject mandatory_fields and digitisation_fields into a custom form if uploaded.

Changes:-

  • custom form if uploaded gets updated with mandatory and digitisation fields during form validation
  • validate-form used to return a message if the form is valid or not; now it returns form data in bytes along with the message if the form is valid.

Frontend Changes:

  • On the frontend side, the bytes returned need to be stored, converted to file and passed during generate-files of project creation
  • Or backend changes needed to accept bytes/file both.

Screenshots

N/A

Alternative Approaches Considered

Did you attempt any other approaches that are not documented in code?

Review Guide

N/A

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@Sujanadh Sujanadh added enhancement New feature or request dependency:osm-fieldwork Requires updates in osm-fieldwork labels Aug 29, 2024
@Sujanadh Sujanadh requested a review from spwoodcock August 29, 2024 09:13
@Sujanadh Sujanadh self-assigned this Aug 29, 2024
@Sujanadh Sujanadh marked this pull request as draft August 29, 2024 09:14
@github-actions github-actions bot added the backend Related to backend code label Aug 29, 2024
@Sujanadh
Copy link
Contributor Author

Sujanadh commented Sep 9, 2024

Updates:

decided to return file instead of bytes directly in the response , bytes in the response seems too large and not compatible.

@Sujanadh Sujanadh marked this pull request as ready for review September 9, 2024 08:21
@NSUWAL123
Copy link
Contributor

NSUWAL123 commented Sep 11, 2024

Updated on frontend as well

@spwoodcock spwoodcock changed the title Update form and validate it Update form by injecting mandatory fields and validate it Sep 11, 2024
@spwoodcock
Copy link
Member

Nice coordinated work guys πŸ‘

I just updated osm-fieldwork to 0.16.0 so this should work.
We can update to 0.16.1 with the new feature updates.

@spwoodcock spwoodcock merged commit 8cc8e14 into development Sep 11, 2024
6 of 7 checks passed
@spwoodcock spwoodcock deleted the feat/update-xls-form branch September 11, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code dependency:osm-fieldwork Requires updates in osm-fieldwork enhancement New feature or request frontend Related to frontend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants