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

Add a create/edit form for environments in the web app [5] #11535

Closed
8 tasks done
bernardsilenou opened this issue Feb 21, 2023 · 4 comments · Fixed by #12240
Closed
8 tasks done

Add a create/edit form for environments in the web app [5] #11535

bernardsilenou opened this issue Feb 21, 2023 · 4 comments · Fixed by #12240
Assignees
Labels
environment feature A new feature to be developed (ticket type) qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented vaadin-app Affects the Vaadin application

Comments

@bernardsilenou
Copy link

bernardsilenou commented Feb 21, 2023

Feature Description

After an Environment entity has been created in #11796 as part of epic #11533, create and edit forms for this entity are now required for the web app.

Added Value/Benefit

Users will be able to create and edit environment entities for further usage in the system.

Acceptance Criteria

  • A creation form for environments has been added with the following fields:
    • Report date (required)
    • External ID
    • Environment name (required)
    • Environment media (required)
    • Location form (region, district, gps lat and gps lon required; region and district pre-filled with the jurisdiction of the user if available)
    • Responsible user (contains a list of all users with the ENVIRONMENT_EDIT user right that are assigned to the district selected in the location form)
  • An edit form for environments has been added with all fields from the creation form and the following additional fields:
    • UUID (read only)
    • Reporting user (read only)
    • Investigation status (required)
    • Water type (if environment media == water)
    • Other water type (if water type == other)
    • Infrastructure details (if environment media == water)
    • Other infrastructure details (if infrastructure details == other)
    • A "Water use" heading (if environment media == water)
    • Checkboxes for all WaterUse enum values (if environment media == water); see the epidemiologicalEvidenceDetails checkboxes of events for reference
    • Other water use (if the checkbox for "Other" water use has been checked)
  • A "New Environment" button has been added to the environment directory created in Add an environment directory for the web app [5] #11534 that brings up the creation form
  • A column with an edit button has been added to the environment directory created in Add an environment directory for the web app [5] #11534 that takes the user to a dedicated page for the environment, displaying the edit form
  • The edit form contains functional buttons to delete and archive the environment if the user has the respective user rights
  • The location form includes the functionality to automatically pick the GPS coordinates based on the address details entered (already implemented; just verify that it's working)
  • The unsaved changes warning appears as expected for the edit form
  • The top navigation when inside the environment edit page contains a backlink that takes the user back to the environment directory

Mockups

  • creation form
    image

  • edit form
    env_editform

Additional Information

The tasks and samples on the right are not supposed to be implemented in this issue.

@bernardsilenou bernardsilenou added the feature A new feature to be developed (ticket type) label Feb 21, 2023
@MateStrysewske MateStrysewske self-assigned this Apr 4, 2023
@MateStrysewske MateStrysewske changed the title Environment Entity- Creation and Edit Forms [web + mobile app] Add create and edit forms for environment entities Apr 5, 2023
@MateStrysewske MateStrysewske removed their assignment Apr 5, 2023
@bernardsilenou bernardsilenou changed the title Add create and edit forms for environment entities Add create and edit forms for environment entities [web and mobile app] May 17, 2023
@MateStrysewske MateStrysewske self-assigned this Jun 1, 2023
@MateStrysewske MateStrysewske changed the title Add create and edit forms for environment entities [web and mobile app] Add a create/edit form for environments in the web app Jun 1, 2023
@MateStrysewske MateStrysewske added vaadin-app Affects the Vaadin application ready Issue fulfills the definition of ready and can be implemented labels Jun 1, 2023
@MateStrysewske MateStrysewske removed their assignment Jun 1, 2023
@MateStrysewske MateStrysewske changed the title Add a create/edit form for environments in the web app Add a create/edit form for environments in the web app [5] Jun 16, 2023
@bernardsilenou
Copy link
Author

@MateStrysewske

@MateStrysewske
Copy link
Contributor

@bernardsilenou I would advise against that because I think you need some sort of human readable representation of the entity that can be displayed e.g. in the directories. Otherwise you'll end up with pretty cryptical strings. Is there any necessity to drop the required constraint from the field?

@bernardsilenou
Copy link
Author

@MateStrysewske

  • There is no necessity, it was feedback from an external partner.
  • I have added "required" tag back in the specificaton

@sergiupacurariu sergiupacurariu self-assigned this Jun 28, 2023
sergiupacurariu added a commit that referenced this issue Jul 4, 2023
…eate_edit_form_for_environments

#11535 - Add a create/edit form for environments in the web app
@adinaflorea9 adinaflorea9 self-assigned this Jul 5, 2023
@adinaflorea9
Copy link

adinaflorea9 commented Jul 7, 2023

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.86.0-SNAPSHOT(19d39a6).

Ticket #12262 will treat the issues of users that have the edit rights over environmental entities but that have a jurisdiction higher than district or no jurisdiction, so that the users are included in the dropdowns of 'Responsible users' in the 'Environments' directory.

Other issues will be linked that will treat the 'Reason for deletion' column being displayed in the 'Environments' directory grid for manually deleted entities, and one that will deal with the editability of environments based on the user's ownership over them and based on the regional jurisdiction: #12280 #12283 #12284 #12285

@adinaflorea9 adinaflorea9 added the qa-verified Issue has been tested and verified by QA label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment feature A new feature to be developed (ticket type) qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented vaadin-app Affects the Vaadin application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants