Comments (2)
Goulet, Dan [X] (Inactive) added a comment - 01/Apr/21 11:42 AM
Hi Macfarlane, Lindsay ENV:EX,
I've reviewed this and attempted to fix it.
I'd imagine this is larger than a 3, could be an 8.
I've provided more technical bits, where the issues are, and likely the things that need to be completed, in hopes of helping in the future:
Code:
Using current release branch
What is this?
The frontend component at registry/components/people/ApplicationAddEdit.vue supports viewing, adding and editing of Classification & Qualifications
The adding feature does not work
How to Reproduce:
get code, docker-compose up
http://localhost:8080/gwells/registries/people/d660ccb1-46d1-4e7a-93f3-0e77f71ecf24
you should see an existing well driller registration, click "add classification" button.
notice that you cannot select one of the select classification radio buttons and have the qualified to drill checkboxes automatically selected for you
select the existing driller, edit it, notice that you can select a classification and the applicable checkboxes automatically get selected for you (this should work on add, but it does not)
this is used in another location too when editing a registration (Lindsay showed me this)
Backend:
stack traces on attempting to save new classifications, regardless of whether or not the frontend code allows selection of classification/qualified to drill.
it appears the backend has an endpoint for this but this feature doesn't work, several errors (registries/serializers.py ApplicationAdminSerializer.create), register_guid violates not-null constraint, likely the value isn't being retrieved or set correctly in to_internal_value. registries/urls.py (url(api_path_prefix() + r'/applications/(?P<application_guid>[-\w]+)$',
never_cache(views.ApplicationDetailView.as_view()),
name='application-detail')), -> registries/views.py/ApplicationDetailView -> registries/serializers.py/ApplicationAdminSerializer.to_internal_value & create
did this work? seems like this entire feature is broken
Frontend:
issues with copying values around in registry/components/people/ApplicationAddEdit.vue in the copyFormData (notice that the copyFormData method is only consumed by the data () { return qualificationForm: this.copyFormData(this.value) } there's a watch named qualificationForm that has a handler, this watch (observable/reactivity) is broken when you use the Add feature. Putting a console.log in watch qualificationForm handler will demonstrate this (try the different scenarios such as view/edit/add and you'll notice the watch is broken only when registration occurs)
I found that a simple fix for the frontend in Add mode can be done by finding the line "if (input) {" in copyFormData (line 201 I believe) and changing it to "if (input && !input.registration) {" will make the selection boxes work as expected. Much to my dismay the backend didn't work either which adds further complexity to this fix and increases the risk/coverage/story points.
from gwells.
This bug still persist:
Describe the Bug
When the Data Specialist is trying to edit the profile of an existing registry (well driller or well pump installer) with "Add classification", the auto select of "Qualified to drill" (Well Driller Registration) or "Qualified" (Pump Installer Registration) is not working after the Classification was selected.
This auto select works fine when creating a new registry.
Expected Behaviour
In the editing page of the existing driller/pump installer profile (Registry/Person Profile), when "add a classification", the "Qualified to drill"/"Qualified" will be auto selected according to the classification type I choose (Pump Installer, Water Well Driller, Geotechnical/Enviromental Driller, or Geoexchange Driller).
Actual Behaviour
In the editing page of the existing driller/pump installer profile (Registry/Person Profile), when "add a classification", nothing was auto selected in the "Qualified to drill"/"Qualified" after I select a classification type (Pump Installer, Water Well Driller, Geotechnical/Environmental Driller, or Geoexchange Driller). This auto select only works well when I am creating a new profile/registry.
** Steps To Reproduce**
Steps to reproduce the behaviour:
- Go to Registry' page, choose Well Driller(default) or Well Pump Installer, and then click the "Search" button to have the registries listed in the Results table
- Click on any of the registry's name to open the Registry/Person Profile page
- Scroll down and click the button "Add classification" under Well Driller Registration or Pump Installer Registration, then click to "Select classification".
- See error: Nothing was auto selected in the list of "Qualified to drill"/"Qualified"
from gwells.
Related Issues (20)
- Test bug (DELETE)
- Test User Story HOT 1
- Update Matomo for Vue 3
- Update Test setup for Vue 3
- Update State Management Library (Post Vue 3 Migration)
- Update mapbox (Post Vue 3 Migration)
- Sentry Audit (Post Vue 3 Migration)
- Remove npm install --legacy-peer-deps flag (Post Vue 3 Migration)
- bootstrap-vue dependency update
- chart.js dependency update (Post Vue 3 Migration)
- vue-matomo dependency update (Post Vue 3 Migration)
- vue-router dependency update (Post Vue 3 Migration)
- vuejs-noty dependency update
- vue-select component update
- sass-loader dependency update (Post Vue 3 Migration)
- vue-loader dependency update (Post Vue 3 Migration)
- vue/compiler-sfc dependency update (Post Vue 3 Migration)
- vue/cli-plugin-babel dependency update (Post Vue 3 Migration)
- Update global store with module stores for Vue 3
- Move Matomo Geolocation to PVC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwells.