bcgov / lcfs

An online application for fuel suppliers to manage their compliance obligations under the Low Carbon Fuels Act
Apache License 2.0
5 stars 3 forks source link

LCFS - Fuel code bugs and predictive text refinements #663

Closed airinggov closed 3 months ago

airinggov commented 4 months ago

Describe the Bug Fuel code bugs and predictive text refinements. Continuation from closed card: #487

These updates will be done after the AG Grid refactor work has been completed.

Expected Behavior TFRS can be used as a hi fidelity prototype as we want to recreate the same functionality. For IDIR users entering a new fuel code, predictive text functionality begins once a user starts typing. Some fields have unique behavior as outlined below:

Fuel code: should not behave like a select list but only suggest one number, the next version of an existing code. e.g. if user types 500, and latest version is 500.4, then 500.5 will be suggested. The field is adding additional decimals, there should only be one decimal in the code. User should be able to add new numbers and not restricted

Company: Contact name and email should be filtered to the company input once a user has entered a company name. If no company has been entered there is no predictive text on name/email.

These fields should predict text for the user based on the first few letters input the user enters and predictions should be pulled from what has already been saved in the database. For example, for feedstock, if the user types "Cor..." then the system should scan the database and provide a list of selectable options that have already been saved in the database that start with "Cor...", such as Corn, Corn oil, Corn husks, etc.

No need for a "Download as Excel" button

Actual Behaviour The following fields still have issues with the predictive text changing previously input fields from other columns:

For example, if I enter text in the Fuel Production facility city field, and then go to choose a province, the city field resets after I choose the province.

Implications The implication this has is having to do back through the grid and re-fill fields that have been automatically changed or deleted as the user inputs data from left of the grid to right. Presently a new city cannot be saved for an existing province/state, country, this should be possible.

Steps To Reproduce Steps to reproduce the behaviour: User/Role: IDIR

  1. Go to Administration tab and Fuel Codes sub tab
  2. Click on New Fuel code
  3. Scroll over to the location entries for the fuel production city, province/state and country columns
  4. Try to input all 3 location types for an address
  5. See error
airinggov commented 3 months ago

Bug card is being closed for other story cards to address issues